Php 解析Facebook Graph getGraphEdge数组

Php 解析Facebook Graph getGraphEdge数组,php,facebook-graph-api,Php,Facebook Graph Api,如何在php中解析这个数组 $graphNode = $response->getGraphEdge(); Facebook\GraphNodes\GraphNode Object ( [items:protected] => Array ( [name] => Haridwar [id] => 108165019208093 ) ) Facebook\GraphNodes\Gra

如何在php中解析这个数组

$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
        )

)

谢谢,伙计们,我得到了答案,这是getGraphEdge上的asArray方法

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

谢谢,伙计们,我得到了答案,这是getGraphEdge上的asArray方法

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

如果你有一个内省IDE,你可能会使用auto complete通过滚动浏览建议来找到你需要的方法。如果你有一个内省IDE,你可能会使用auto complete通过滚动浏览建议来找到你需要的方法。