[line 39]
Manage images and handle database communication.
Only one instance of this class should exist for one database connection, i.e. one instance of GALGallery. This is assured inside __construct(). Most work is done by inherited methods from GALTable.
This constructor shouldn't be called by a library user, the representations for the used tables are automatically created by the GALGallery object.
Check if an instance of Images already exists in the specified GALGallery. If this is the case, throw an GAL_EImage. If not, read necessary information for further initialization from $glb.
After creating a new GALImage, create a new GALInstance with instanceID = GAL_IMG_RAW and the unchanged image data. The parameter $values is an associative array with the following fields:
$values['owner'] GALUser optional The new image's owner, default: The user currently logged in.
$values['series'] GALSeries optional The new image's series, default series 1.
$values['film'] GALFilm optional The new image's film, default film 1.
string guessExtensionFromConfig(
int
$instanceID, GALBlob
$sourceBlob)
Guess the image format the raw image data should be converted to.
The algorithm to determine the correct/optimal image format for thumbnails etc. is somewhat complicated, because it honors multiple config file options. It is externalized here.
Returns the instance ID's which get an annotation.
This method returns an array of instanceIDs which get an annotation when converted. By default only GAL_IMG_MEDIUM and GAL_IMG_BIG get an annotation, because there wouldn't be enough space for annotations on thumbnails.
SQL expression that is TRUE only for images visible to the user currently logged in.
Images with trashFlag set, visibleFlag unset, uploadFlag set or locked images, and images where the user currently logged in hasn't got the permission to see them are considered invisible. This method doesn't use the advanced SQL comparison class GALExpressionCompare, because it was derivated from existing code ;-).
Tags:
return:
A SQL logical expression that evaluates to TRUE for visible images.
Overrides GALGallueTable::visible() (SQL expression that is TRUE only for items visible to the user currently logged in.)
SQL expression that is TRUE only for images writeable by the user currently logged in.
Images with trashFlag set, visibleFlag unset, uploadFlag set or locked images, and images where the user currently logged in hasn't got the permission to write are considered unwriteable. This method doesn't use the advanced SQL comparison class GALExpressionCompare, because it was derivated from existing code ;-).
Tags:
return:
A SQL logical expression that evaluates to TRUE for writeable images.
Overrides GALGallueTable::writeable() (SQL expression that is TRUE only for items writeable by the user currently logged in.)