Cheetah
|
Public Member Functions | |
__construct (array $items=[]) | |
getField ($name, $default=null) | |
getProperty ($name, $default=null) | |
getFieldNames () | |
getPropertyNames () | |
all () | |
asArray () | |
map (\Closure $callback) | |
asJson ($options=0) | |
count () | |
getIterator () | |
offsetExists ($key) | |
offsetGet ($key) | |
offsetSet ($key, $value) | |
offsetUnset ($key) | |
__toString () | |
Protected Attributes | |
$items = [] | |
Definition at line 39 of file Collection.php.
Facebook\GraphNodes\Collection::__construct | ( | array | $items = [] | ) |
Create a new collection.
array | $items |
Reimplemented in Facebook\GraphNodes\GraphNode.
Definition at line 53 of file Collection.php.
Facebook\GraphNodes\Collection::__toString | ( | ) |
Convert the collection to its string representation.
Definition at line 238 of file Collection.php.
Facebook\GraphNodes\Collection::all | ( | ) |
Facebook\GraphNodes\Collection::asArray | ( | ) |
Get the collection of items as a plain array.
Definition at line 129 of file Collection.php.
Facebook\GraphNodes\Collection::asJson | ( | $options = 0 | ) |
Get the collection of items as JSON.
int | $options |
Reimplemented in Facebook\GraphNodes\GraphNode.
Definition at line 155 of file Collection.php.
Facebook\GraphNodes\Collection::count | ( | ) |
Count the number of items in the collection.
Definition at line 165 of file Collection.php.
Facebook\GraphNodes\Collection::getField | ( | $name, | |
$default = null |
|||
) |
Gets the value of a field from the Graph node.
string | $name | The field to retrieve. |
mixed | $default | The default to return if the field doesn't exist. |
Definition at line 66 of file Collection.php.
Facebook\GraphNodes\Collection::getFieldNames | ( | ) |
Returns a list of all fields set on the object.
Definition at line 96 of file Collection.php.
Facebook\GraphNodes\Collection::getIterator | ( | ) |
Facebook\GraphNodes\Collection::getProperty | ( | $name, | |
$default = null |
|||
) |
Gets the value of the named property for this graph object.
string | $name | The property to retrieve. |
mixed | $default | The default to return if the property doesn't exist. |
Definition at line 86 of file Collection.php.
Facebook\GraphNodes\Collection::getPropertyNames | ( | ) |
Returns a list of all properties set on the object.
Definition at line 109 of file Collection.php.
Facebook\GraphNodes\Collection::map | ( | \Closure | $callback | ) |
Run a map over each of the items.
\Closure | $callback |
Reimplemented in Facebook\GraphNodes\GraphEdge.
Definition at line 143 of file Collection.php.
Facebook\GraphNodes\Collection::offsetExists | ( | $key | ) |
Determine if an item exists at an offset.
mixed | $key |
Definition at line 187 of file Collection.php.
Facebook\GraphNodes\Collection::offsetGet | ( | $key | ) |
Get an item at a given offset.
mixed | $key |
Definition at line 199 of file Collection.php.
Facebook\GraphNodes\Collection::offsetSet | ( | $key, | |
$value | |||
) |
Set the item at a given offset.
mixed | $key | |
mixed | $value |
Definition at line 212 of file Collection.php.
Facebook\GraphNodes\Collection::offsetUnset | ( | $key | ) |
Unset the item at a given offset.
string | $key |
Definition at line 228 of file Collection.php.
|
protected |
Definition at line 46 of file Collection.php.