Как получить значения из нескольких защищенных массивов - PullRequest
0 голосов
/ 27 октября 2019

Я пытаюсь получить все руководство и название из нескольких защищенных массивов. Я использую https://github.com/rhuanbarreto/alfresco-api-php-client и пытаюсь перечислить все сайты со списком сайтов. Но вывод находится в защищенном массиве

Alfresco\Model\SitePaging Object
(
    [container:protected] => Array
        (
            [list] => Alfresco\Model\SitePagingList Object
                (
                    [container:protected] => Array
                        (
                            [pagination] => Alfresco\Model\Pagination Object
                                (
                                    [container:protected] => Array
                                        (
                                            [count] => 5
                                            [has_more_items] => 
                                            [total_items] => 5
                                            [skip_count] => 0
                                            [max_items] => 100
                                        )

                                )

                            [entries] => Array
                                (
                                    [0] => Alfresco\Model\SiteEntry Object
                                        (
                                            [container:protected] => Array
                                                (
                                                    [entry] => Alfresco\Model\Site Object
                                                        (
                                                            [container:protected] => Array
                                                                (
                                                                    [id] => moderated-website
                                                                    [guid] => 99996102-2b6e-4545-83fe-8d9c3a517ca8
                                                                    [title] => Moderated website
                                                                    [description] => not all user can use
                                                                    [visibility] => PUBLIC
                                                                    [preset] => site-dashboard
                                                                    [role] => SiteManager
                                                                )

                                                        )

                                                )

                                        )

                                    [1] => Alfresco\Model\SiteEntry Object
                                        (
                                            [container:protected] => Array
                                                (
                                                    [entry] => Alfresco\Model\Site Object
                                                        (
                                                            [container:protected] => Array
                                                                (
                                                                    [id] => pesta
                                                                    [guid] => faffc572-ae66-40b0-95cb-f49093bc754f
                                                                    [title] => pesta
                                                                    [description] => pesta ultah aristo
                                                                    [visibility] => PRIVATE
                                                                    [preset] => site-dashboard
                                                                    [role] => SiteManager
                                                                )

                                                        )

                                                )

                                        )

                                    [2] => Alfresco\Model\SiteEntry Object
                                        (
                                            [container:protected] => Array
                                                (
                                                    [entry] => Alfresco\Model\Site Object
                                                        (
                                                            [container:protected] => Array
                                                                (
                                                                    [id] => swsdp
                                                                    [guid] => b4cff62a-664d-4d45-9302-98723eac1319
                                                                    [title] => Sample: Web Site Design Project
                                                                    [description] => This is a Sample Alfresco Team site.
                                                                    [visibility] => PUBLIC
                                                                    [preset] => site-dashboard
                                                                    [role] => SiteManager
                                                                )

                                                        )

                                                )

                                        )

                                    [3] => Alfresco\Model\SiteEntry Object
                                        (
                                            [container:protected] => Array
                                                (
                                                    [entry] => Alfresco\Model\Site Object
                                                        (
                                                            [container:protected] => Array
                                                                (
                                                                    [id] => screenshot
                                                                    [guid] => 97e28707-80a6-4c00-9fa9-d4e739613d72
                                                                    [title] => Screenshot
                                                                    [description] => Ini untuk di ss
                                                                    [visibility] => PRIVATE
                                                                    [preset] => site-dashboard
                                                                    [role] => SiteManager
                                                                )

                                                        )

                                                )

                                        )

                                    [4] => Alfresco\Model\SiteEntry Object
                                        (
                                            [container:protected] => Array
                                                (
                                                    [entry] => Alfresco\Model\Site Object
                                                        (
                                                            [container:protected] => Array
                                                                (
                                                                    [id] => test1
                                                                    [guid] => b32842f6-808c-42b5-b7ed-2a4730bcb04f
                                                                    [title] => test1
                                                                    [description] => testing 123

                                                                    [visibility] => PRIVATE
                                                                    [preset] => site-dashboard
                                                                    [role] => SiteManager
                                                                )

                                                        )

                                                )

                                        )

                                )

                        )

                )

        )

)

Я попробовал метод foreach для контейнеров, записей и записей, но он даже не запустит эхо-тест. (результат $ - это результат). Пожалуйста, помогите и спасибо

foreach($result as $containers) {
    echo "test";
}
...