Magic method to access this row's fields like native PHP properties.
Class Details
[line 240]
Provide information specific to an image's instance.
An instance corresponds to a @link GALBlob} containing the image data. Information like MIME-type, file extension and file size is kept inside the "blob" property, while width and height can be accessed through the "x" and "y" properties. A GALInstance always belongs to a certain GALImage. One can only change the "blob" and "permission properties. When changing the "blob" property, the image dimensions are adjusted automatically. Instances are created by GALImages::add() and (indirectly) by GALImage::addInstance(). If you want to mess up your image database (for example: thumbnail and full res image show sth. different), you can of course use GALInstances::add() instead ;).
This class provides various properties accessed via the magic methods GALInstance::__get() and GALInstance::__set(). Some of these properties correspond to database fields, some do not. The __get() and __set() methods internally use the GALInstance::get() and GALInstance::set() methods which provide access control - in contrast to the parent class's GALRow::get() and GALTableRow::set() methods. After performing the access control, these are used to read and write the properties corresponding to database fields. All properties corresponding to database fields are of type string, but instead database types are given here. (r indicates readable, w writable)
Properties corresponding to database fields:
INTEGER UNSIGNED imageID r The numerical ID of the image the instance belongs to.
This method deletes the instance's GALBlob unless it is referenced by other instances or jobs, deletes the database row and then calls the refresh() method of the instance's image. If deleting fails, an GAL_EInstance is thrown.
First of all access control is performed. If successful, properties not corresponding to database fields are handled by this method itself. Properties corresponding to database fields are delegated to the inherited GALRow::get() method. It might seem strange that overriding access control is the default. It is like it is because GALRow::__construct() called by GALInstance::__construct reads the row's primary key using the get() method. In our case the original get() method is overridden by the current one, so it has to work in this case without second parameter.
Overrides GALRow::get() (Returns the value of a field.)
It internally uses the GALInstance::get() method with enforced access control. Library users should not explicitly call the __get() method - it is good for nothing. If you want to read a property with a method call, use get() instead. This method also provides overriding access control if required.
Tags:
return:
The propertie's value.
Overrides GALRow::__get() (Magic method to access this row's fields like native PHP properties.)