2017-12-23 18 views
0

PHPでこの配列を解析するには?Parse Facebook Graph getGraphEdge Array

$graphNode = $response->getGraphEdge(); 

Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Haridwar 
      [id] => 108165019208093 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Haridwar - देवभूमि हरिद्वार 
      [id] => 1421343878181284 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Haridwar , Rishikesh 
      [id] => 422468281161935 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Harkipodi, Haridwar 
      [id] => 1729854440364388 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Haridwar, Uttrakhand 
      [id] => 271122532995757 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Haridwar Harki Poudi 
      [id] => 407948889585330 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Hari Ki Paudi, Haridwar 
      [id] => 1408036495920326 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Hotel Haridwar 
      [id] => 499032723507426 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Haridwar Residency 
      [id] => 553955321295065 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Haridwar + Rishikesh 
      [id] => 332726176855030 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Koti Scoops 
      [id] => 511614448958675 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Haridwar Junction railway station 
      [id] => 362403983924849 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Haridwar district 
      [id] => 104069102963739 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Acharyakulam, Haridwar 
      [id] => 450267691725152 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Haridwar, Uttarakhand 
      [id] => 169553733566933 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Patanjali Yogpeeth, Haridwar 
      [id] => 852886484794187 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Haridwar. 
      [id] => 321176964637111 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => हर की पौड़ी - Haridwar 
      [id] => 1322823121134475 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Haridwar city 
      [id] => 107543295960409 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Shantikunj, Haridwar 
      [id] => 112797876037151 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Haridwar N Mansuri... 
      [id] => 237523539684453 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Ganges 
      [id] => 107615949267735 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Haridwar : The City Of Love & Nature 
      [id] => 1172065216231819 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Wave Cinemas Haridwar 
      [id] => 1597030567189676 
     ) 

) 
Facebook\GraphNodes\GraphNode Object 
(
    [items:protected] => Array 
     (
      [name] => Shahastradhara Deharadun Uttrakhand 
      [id] => 1456909874548716 
     ) 

) 
+0

イントロスペクションIDEを使用している場合は、候補をスクロールして自動補完機能を使用して、必要な方法を見つけることができます。 – halfer

答えて

0

ありがとうございました。getGraphEdgeにasArray()メソッドがあります。

$response->getGraphEdge()->asArray();