ReportBlob Class Reference

List of all members.

Public Member Functions

 __construct ($type=BLOB_NULL, $year=0, $owner=0, $proj=0)
 getAddress ()
 getData ()
 getId ()
 getLastChanged ()
 getOwnerId ()
 getProjectId ()
 getType ()
 isEncrypted ()
 getMD5 ($urlencode=true)
 store (&$data, $address=null, $encrypt=false)
 delete ($address)
 load ($address=null, $skipCache=false)
 loadFromId ($id=null)
 Loads the complete record (data + metadata) for a given blob ID.
 loadFromMD5 ($id=null)
 Loads the complete record (data + metadata) for a given blob MD5.

Static Public Member Functions

static create_address ($rptype=null, $section=null, $item=null, $subitem=null)
 Assemble a addressing array based on the arguments received.

Static Public Attributes

static $cache = array()
static $counter = 0

Member Function Documentation

ReportBlob::load ( address = null,
skipCache = false 
)

Loads the complete record (data + metadata) for a given address.

If address is not unique (ie, it is not specific enough to fetch a single entry from the database), a DomainException is thrown and the internal state of the Blob instance is unchanged.

ReportBlob::store ( &$  data,
address = null,
encrypt = false 
)

Stores the blob data at the specified address. If the address is not known internally ($this->_address), and the argument is empty, the call will fail and nothing will be written to the database.

Note: some blob types are automatically serialized/unserialized.

The address parameter is expected to be an array created using the create_address() method.

Throws:

  • InvalidArgumentException (serialize() returned false, or address components have a blank key and/or associated value).
  • DomainException (blob type is null).
  • UnexpectedValueException (unknown blob type).

The documentation for this class was generated from the following file:

Generated on 9 Jan 2025 for The Forum by  doxygen 1.6.1