Class: GALGroup
Source Location: /libgallue/group.inc.php
GALRow
|
--GALTableRow
|
--GALGroup
Provide information about a group's content and association with other objects inside the gallery.
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Class Methods
constructor __construct [line 289]
GALGroup __construct(
GALGallery
$glb,
$result,
&$data,
$table, array
$data)
|
|
Initialize. This constructor is not intended to be called by library users, it is called inside GALGroupIterator::fetch().
Overrides GALTableRow::__construct() (Initializes this object.)
Parameters:
method addImage [line 573]
void addImage(
GALImage
$image, [int
$position = 0], [bool
$super = false])
|
|
Add the specified image to this group. Note that the $position parameter is just a raw value and not the real position of the image.
Parameters:
method canEdit [line 669]
Check if the specified user has got the privilege to change the group's properties.
Tags:
Parameters:
method canView [line 654]
Check if the specified user has got the privilege to read the group's properties.
Tags:
Parameters:
method countComments [line 466]
GALCommentIterator countComments(
$expr, [GALOrder
$order = ""], [string
$limit = ""], [string
$additional = ""], [bool
$super = false])
|
|
Counts user comments about this group. It adds a comparison expression and ordering by commentID to the arguments and passes them to GALTable::extendedCount().
Tags:
Parameters:
method countImages [line 436]
GALImageIterator countImages(
$expr, [GALOrder
$order = ""], [string
$limit = ""], [string
$additional = ""], [bool
$super = false])
|
|
Counts images which are member of this group. It adds a specially crafted join, a comparison expression and ordering by imageID to the arguments and passes them to GALTable::extendedCount().
Tags:
Parameters:
method delete [line 534]
void delete(
[bool
$super = false])
|
|
Deletes this group. Remove all images from this group and force them to reload their group membership information; then delete all user comments about this group.
Overrides GALTableRow::delete() (Deletes this row from the database.)
Parameters:
method get [line 326]
void get(
string
$field, [bool
$super = true])
|
|
Reads a property via method call. First of all it performs access control. 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 GALGroup::__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.)
Parameters:
method getID [line 362]
int getID(
[
$super = false])
|
|
The value of the primary key field. This method provides access to the primary key without knowing the name of the primary key field. This method is implemented by all classes whose tables have a single numerical primary key. At the moment it is only used in GALComments::add(). (Better: It was introduced for GALComments::add() ;-) )
Tags:
Parameters:
method getPosition [line 617]
int getPosition(
GALImage
$image, [bool
$super = false])
|
|
Returns the position of the given GALImage. Note that the returned position is just the raw value read from ImageInGroup.imagePosition. If the image isn't member of this group, this method returns FALSE.
Tags:
Parameters:
method loadComments [line 408]
GALCommentIterator loadComments(
$expr, [GALOrder
$order = ""], [string
$limit = ""], [string
$additional = ""], [bool
$super = false])
|
|
Loads user comments about this group. It adds a comparison expression and ordering by commentID to the arguments and passes them to GALTable::extendedLoad().
Tags:
Parameters:
method loadImages [line 378]
GALImageIterator loadImages(
$expr, [GALOrder
$order = ""], [string
$limit = ""], [string
$additional = ""], [bool
$super = false])
|
|
Loads images which are member of this group. It adds a specially crafted join, a comparison expression and ordering by imageID to the arguments and passes them to GALTable::extendedLoad().
Tags:
Parameters:
method refresh [line 521]
Force reloading cached information about membership of images and visible images and about user comments. The information is reread on the next access of the property.
method removeImage [line 637]
void removeImage(
GALImage
$image, [bool
$super = false])
|
|
Remove the specified image from this group.
Parameters:
method set [line 504]
void set(
string
$field, mixed
$value, [bool
$super = false])
|
|
Set a property via method call. 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 GALTableRow::set() method. It also updates the changeDate property on every call.
Overrides GALTableRow::set() (Sets the specified field of this row to the specified value.)
Parameters:
method setPosition [line 595]
void setPosition(
GALImage
$image, int
$position, [bool
$super = false])
|
|
Sets the position of the given GALImage. Note that the $position parameter is just a raw value and not the real position. If the image isn't inside this group, nothing happens, not even an error message.
Parameters:
method __get [line 307]
mixed __get(
string
$field)
|
|
Magic method to read properties. It internally uses the 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. That method also provides overriding access control if required.
Tags:
Overrides GALRow::__get() (Magic method to access this row's fields like native PHP properties.)
Parameters:
method __set [line 489]
void __set(
string
$field, mixed
$value)
|
|
Magic method to set properties It internally uses GALGroup::set() with enforced access control.
Overrides GALTableRow::__set() (Magic method to set a field of this row almost like a native PHP property.)
Parameters:
|
|