Methods summary
public static
boolean
|
#
add_items( integer $id, array $item_array, string $rel_name, boolean $exclusive = false )
Adds Items to a Collection.
Adds Items to a Collection.
Parameters
- $id
integer $id Id from Collection to add Items to.
- $item_array
array $item_array Array of Item Ids to add.
- $rel_name
string $rel_name Name of the relationship to use.
- $exclusive
boolean $exclusive Whether the added items have an exclusive relationship with the
collection.
Returns
boolean Returns true if success, false if error
|
public static
boolean
|
#
set_items( integer $id, array $item_array, string $rel_name, boolean $exclusive = false )
Sets Items to a Collection.
Sets Items to a Collection.
Parameters
- $id
integer $id Id from Collection to add Items to.
- $item_array
array $item_array Array of Item Ids to set.
- $rel_name
string $rel_name Name of the relationship to use.
- $exclusive
boolean $exclusive Whether the added items have an exclusive relationship with the
collection.
Returns
boolean Returns true if success, false if error
|
public static
int[]|boolean
|
#
get_items( integer $id, string $rel_name, boolean $inverse = false )
Get Items from a Collection.
Get Items from a Collection.
Parameters
- $id
integer $id Id from Collection to get Items from.
- $rel_name
string $rel_name Name of the relationship linking the items.
- $inverse
boolean $inverse Whether the Id specified is in the first (false) or second (true) term
of the relationship.
Returns
int[]|boolean Returns an array of Item IDs, or false if error.
|
public static
integer
|
#
count_items( integer $id, string $rel_name, boolean $inverse = false, boolean $recursive = false )
Count the number of related items.
Count the number of related items.
Parameters
- $id
integer $id Item to count related items with.
- $rel_name
string $rel_name Name of the relationship
- $inverse
boolean $inverse position of the Item in the relationship (first = false, seccond =
true)
- $recursive
boolean $recursive Whether to count recursively or not
Returns
integer Number of items related with the one specified.
|
public static
boolean
|
#
remove_items( integer $id, array $item_array, string $rel_name )
Remove Items from a Collection.
Remove Items from a Collection.
Parameters
- $id
integer $id Id from Collection to remove Items from.
- $item_array
array $item_array Array of Item Ids to remove.
- $rel_name
string $rel_name Name of the relationship to use.
Returns
boolean Returns true if success, false if error.
|
public static
boolean
|
#
remove_all_items( integer $id, string $rel_name )
Remove all items from a collection.
Remove all items from a collection.
Parameters
- $id
integer $id ID of the Collection to remove items from.
- $rel_name
string $rel_name Name of the relationship to use.
Returns
boolean Returns true if success, false if error.
|
public static
|
#
set_timestamp( mixed $id1, mixed $id2, mixed $rel_name, mixed $timestamp )
|
public static
|
|