|
@@ 221-229 (lines=9) @@
|
| 218 |
|
* |
| 219 |
|
* @throws FacebookSDKException |
| 220 |
|
*/ |
| 221 |
|
public function validateResponseCastableAsGraphNode() |
| 222 |
|
{ |
| 223 |
|
if (isset($this->decodedBody['data']) && static::isCastableAsGraphEdge($this->decodedBody['data'])) { |
| 224 |
|
throw new FacebookSDKException( |
| 225 |
|
'Unable to convert response from Graph to a GraphNode because the response looks like a GraphEdge. Try using GraphNodeFactory::makeGraphEdge() instead.', |
| 226 |
|
620 |
| 227 |
|
); |
| 228 |
|
} |
| 229 |
|
} |
| 230 |
|
|
| 231 |
|
/** |
| 232 |
|
* Validates that the return data can be cast as a GraphEdge. |
|
@@ 236-244 (lines=9) @@
|
| 233 |
|
* |
| 234 |
|
* @throws FacebookSDKException |
| 235 |
|
*/ |
| 236 |
|
public function validateResponseCastableAsGraphEdge() |
| 237 |
|
{ |
| 238 |
|
if (!(isset($this->decodedBody['data']) && static::isCastableAsGraphEdge($this->decodedBody['data']))) { |
| 239 |
|
throw new FacebookSDKException( |
| 240 |
|
'Unable to convert response from Graph to a GraphEdge because the response does not look like a GraphEdge. Try using GraphNodeFactory::makeGraphNode() instead.', |
| 241 |
|
620 |
| 242 |
|
); |
| 243 |
|
} |
| 244 |
|
} |
| 245 |
|
|
| 246 |
|
/** |
| 247 |
|
* Safely instantiates a GraphNode of $subclassName. |