Heim > Backend-Entwicklung > PHP-Tutorial > 关于zend_acl,该如何解决

关于zend_acl,该如何解决

WBOY
Freigeben: 2016-06-13 10:15:49
Original
725 Leute haben es durchsucht

关于zend_acl
用zend_acl ,把$acl最后生成的放到一个文件里,现在我把它反序列取出来,成为一个数组。但是我要取出单独一个角色和资源来判断非常麻烦,不知道大牛们是怎么做的,愿听指教。

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Zend_Acl Object(    [_roleRegistry:protected] => Zend_Acl_Role_Registry Object        (            [_roles:protected] => Array                (                    [guest] => Array                        (                            [instance] => Zend_Acl_Role Object                                (                                    [_roleId:protected] => guest                                )                            [parents] => Array                                (                                )                            [children] => Array                                (                                    [member] => Zend_Acl_Role Object                                        (                                            [_roleId:protected] => member                                        )                                )                        )                    [member] => Array                        (                            [instance] => Zend_Acl_Role Object                                (                                    [_roleId:protected] => member                                )                            [parents] => Array                                (                                    [guest] => Zend_Acl_Role Object                                        (                                            [_roleId:protected] => guest                                        )                                )                            [children] => Array                                (                                )                        )                    [admin] => Array                        (                            [instance] => Zend_Acl_Role Object                                (                                    [_roleId:protected] => admin                                )                            [parents] => Array                                (                                )                            [children] => Array                                (                                )                        )                )        )    [_resources:protected] => Array        (            [entertain] => Array                (                    [instance] => Zend_Acl_Resource Object                        (                            [_resourceId:protected] => entertain                        )                    [parent] =>                     [children] => Array                        (                        )                )            [sports] => Array                (                    [instance] => Zend_Acl_Resource Object                        (                            [_resourceId:protected] => sports                        )                    [parent] =>                     [children] => Array                        (                        )                )            [news] => Array                (                    [instance] => Zend_Acl_Resource Object                        (                            [_resourceId:protected] => news                        )                    [parent] =>                     [children] => Array                        (                        )                )        )    [_isAllowedRole:protected] =>     [_isAllowedResource:protected] =>     [_isAllowedPrivilege:protected] =>     [_rules:protected] => Array        (            [allResources] => Array                (                    [allRoles] => Array                        (                            [allPrivileges] => Array                                (                                    [type] => TYPE_DENY                                    [assert] =>                                 )                            [byPrivilegeId] => Array                                (                                )                        )                    [byRoleId] => Array                        (                        )                )            [byResourceId] => Array                (                    [entertain] => Array                        (                            [byRoleId] => Array                                (                                    [guest] => Array                                        (                                            [byPrivilegeId] => Array                                                (                                                    [watch] => Array                                                        (                                                            [type] => TYPE_ALLOW                                                            [assert] =>                                                         )                                                )                                            [allPrivileges] => Array                                                (                                                    [type] =>                                                     [assert] =>                                                 )                                        )                                    [member] => Array                                        (                                            [byPrivilegeId] => Array                                                (                                                    [watch] => Array                                                        (                                                            [type] => TYPE_ALLOW                                                            [assert] =>                                                         )                                                    [edit] => Array                                                        (                                                            [type] => TYPE_ALLOW                                                            [assert] =>                                                         )                                                    [add] => Array                                                        (                                                            [type] => TYPE_ALLOW                                                            [assert] =>                                                         )                                                )                                            [allPrivileges] => Array                                                (                                                    [type] =>                                                     [assert] =>                                                 )                                        )                                    [admin] => Array                                        (                                            [byPrivilegeId] => Array                                                (                                                    [watch] => Array                                                        (                                                            [type] => TYPE_ALLOW                                                            [assert] =>                                                         )                                                    [edit] => Array                                                        (                                                            [type] => TYPE_ALLOW                                                            [assert] =>                                                         )                                                    [add] => Array                                                        (                                                            [type] => TYPE_ALLOW                                                            [assert] =>                                                         )                                                    [delete] => Array                                                        (                                                            [type] => TYPE_ALLOW                                                            [assert] =>                                                         )                                                )                                            [allPrivileges] => Array                                                (                                                    [type] =>                                                     [assert] =>                                                 )                                        )                                )                        )………………)<div class="clear">
                 
              
              
        
            </div>
Nach dem Login kopieren
Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage