Class: GALComment
Source Location: /libgallue/comment.inc.php
GALRow
|
--GALTableRow
|
--GALComment
Provide information about a comment's content, it's parent and follow-up comments.
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Class Methods
constructor __construct [line 303]
GALComment __construct(
GALGallery
$glb,
$result,
&$data,
$table, array
$data)
|
|
Initialize. This constructor is not intended to be called by library users, it is called inside GALCommentIterator::fetch().
Overrides GALTableRow::__construct() (Initializes this object.)
Parameters:
method canEdit [line 585]
Check if the specified user has got the privilege to change the comment's properties.
Tags:
Parameters:
method canView [line 571]
Check if the specified user has got the privilege to read the comment's properties.
Tags:
Parameters:
method countComments [line 467]
GALCommentIterator countComments(
$expr, [GALOrder
$order = ""], [string
$limit = ""], [string
$additional = ""], [bool
$super = false])
|
|
Counts follow-up comments about this comment. It adds a comparison expression and ordering by commentID to the arguments and passes them to GALTable::extendedCount().
Tags:
Parameters:
method delete [line 535]
void delete(
[bool
$super = false])
|
|
Delete the comment. This method deletes the comment and all follow-up comments. and forces reloading the cached information of it's parent and it's owner.
Overrides GALTableRow::delete() (Deletes this row from the database.)
Parameters:
method get [line 340]
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 GALcomment::__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 423]
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 getParent [line 373]
mixed getParent(
[bool
$super = false])
|
|
Return the comment's parent. In most cases parentClass is one of GALImage, GALComment, GALCategory, GALGroup, GALSeries or GALFilm. These classes have got a singe numerical value as their table's primary key, so parentClass and parentID identify the parent object which is in this case returned by this method. Because parentID doesn't reference a specific key, it cannot be protected by a FOREIGN KEY construct, and bugs inside libgallue could result in invalid values, but normally the delete() methods should also delete all depending comments. If parentClass contains a value different from the values listed above, this method just returns the value of parentClass.
Tags:
Overrides GALTableRow::getParent() (Returns the top level parent of this row.)
Parameters:
method loadComments [line 439]
GALCommentIterator loadComments(
$expr, [GALOrder
$order = ""], [string
$limit = ""], [string
$additional = ""], [bool
$super = false])
|
|
Loads follow-up comments about this comment. It adds a comparison expression and ordering by commentID to the arguments and passes them to GALTable::extendedLoad().
Tags:
Parameters:
method refresh [line 524]
Reload cached information. Force reloading information about follow-up comments. The next time the "comments" property is read, the information is loaded again.
method set [line 505]
void set(
string
$field, mixed
$value, [bool
$super = false])
|
|
Set 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 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 __get [line 321]
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 490]
void __set(
string
$field, mixed
$value)
|
|
Magic method to set properties It internally uses set() with enforced access control.
Overrides GALTableRow::__set() (Magic method to set a field of this row almost like a native PHP property.)
Parameters:
|
|