Definition at line 43 of file GraphNodeFactory.php.
◆ __construct()
◆ castAsGraphNodeOrGraphEdge()
Facebook\GraphNodes\GraphNodeFactory::castAsGraphNodeOrGraphEdge |
( |
array |
$data, |
|
|
|
$subclassName = null , |
|
|
|
$parentKey = null , |
|
|
|
$parentNodeId = null |
|
) |
| |
Takes an array of values and determines how to cast each node.
- Parameters
-
array | $data | The array of data to iterate over. |
string | null | $subclassName | The subclass to cast this collection to. |
string | null | $parentKey | The key of this data (Graph edge). |
string | null | $parentNodeId | The parent Graph node ID. |
- Returns
- GraphNode|GraphEdge
- Exceptions
-
Definition at line 299 of file GraphNodeFactory.php.
◆ getMetaData()
Facebook\GraphNodes\GraphNodeFactory::getMetaData |
( |
array |
$data | ) |
|
Get the meta data from a list in a Graph response.
- Parameters
-
array | $data | The Graph response. |
- Returns
- array
Definition at line 353 of file GraphNodeFactory.php.
◆ isCastableAsGraphEdge()
static Facebook\GraphNodes\GraphNodeFactory::isCastableAsGraphEdge |
( |
array |
$data | ) |
|
|
static |
◆ makeGraphAchievement()
Facebook\GraphNodes\GraphNodeFactory::makeGraphAchievement |
( |
| ) |
|
◆ makeGraphAlbum()
Facebook\GraphNodes\GraphNodeFactory::makeGraphAlbum |
( |
| ) |
|
◆ makeGraphEdge()
Facebook\GraphNodes\GraphNodeFactory::makeGraphEdge |
( |
|
$subclassName = null , |
|
|
|
$auto_prefix = true |
|
) |
| |
◆ makeGraphEvent()
Facebook\GraphNodes\GraphNodeFactory::makeGraphEvent |
( |
| ) |
|
◆ makeGraphGroup()
Facebook\GraphNodes\GraphNodeFactory::makeGraphGroup |
( |
| ) |
|
◆ makeGraphNode()
Facebook\GraphNodes\GraphNodeFactory::makeGraphNode |
( |
|
$subclassName = null | ) |
|
◆ makeGraphPage()
Facebook\GraphNodes\GraphNodeFactory::makeGraphPage |
( |
| ) |
|
◆ makeGraphSessionInfo()
Facebook\GraphNodes\GraphNodeFactory::makeGraphSessionInfo |
( |
| ) |
|
◆ makeGraphUser()
Facebook\GraphNodes\GraphNodeFactory::makeGraphUser |
( |
| ) |
|
◆ safelyMakeGraphEdge()
Facebook\GraphNodes\GraphNodeFactory::safelyMakeGraphEdge |
( |
array |
$data, |
|
|
|
$subclassName = null , |
|
|
|
$parentKey = null , |
|
|
|
$parentNodeId = null |
|
) |
| |
Return an array of GraphNode's.
- Parameters
-
array | $data | The array of data to iterate over. |
string | null | $subclassName | The GraphNode subclass to cast each item in the list to. |
string | null | $parentKey | The key of this data (Graph edge). |
string | null | $parentNodeId | The parent Graph node ID. |
- Returns
- GraphEdge
- Exceptions
-
Definition at line 326 of file GraphNodeFactory.php.
◆ safelyMakeGraphNode()
Facebook\GraphNodes\GraphNodeFactory::safelyMakeGraphNode |
( |
array |
$data, |
|
|
|
$subclassName = null |
|
) |
| |
Safely instantiates a GraphNode of $subclassName.
- Parameters
-
array | $data | The array of data to iterate over. |
string | null | $subclassName | The subclass to cast this collection to. |
- Returns
- GraphNode
- Exceptions
-
Definition at line 256 of file GraphNodeFactory.php.
◆ validateResponseAsArray()
Facebook\GraphNodes\GraphNodeFactory::validateResponseAsArray |
( |
| ) |
|
◆ validateResponseCastableAsGraphEdge()
Facebook\GraphNodes\GraphNodeFactory::validateResponseCastableAsGraphEdge |
( |
| ) |
|
◆ validateResponseCastableAsGraphNode()
Facebook\GraphNodes\GraphNodeFactory::validateResponseCastableAsGraphNode |
( |
| ) |
|
◆ validateSubclass()
static Facebook\GraphNodes\GraphNodeFactory::validateSubclass |
( |
|
$subclassName | ) |
|
|
static |
Ensures that the subclass in question is valid.
- Parameters
-
string | $subclassName | The GraphNode subclass to validate. |
- Exceptions
-
Definition at line 384 of file GraphNodeFactory.php.
◆ $decodedBody
Facebook\GraphNodes\GraphNodeFactory::$decodedBody |
|
protected |
◆ $response
Facebook\GraphNodes\GraphNodeFactory::$response |
|
protected |
◆ BASE_GRAPH_EDGE_CLASS
◆ BASE_GRAPH_NODE_CLASS
◆ BASE_GRAPH_OBJECT_PREFIX
const Facebook\GraphNodes\GraphNodeFactory::BASE_GRAPH_OBJECT_PREFIX = '\Facebook\GraphNodes\\' |
The documentation for this class was generated from the following file: