Home > Backend Development > PHP Tutorial > 关于zend_acl,该如何解决

关于zend_acl,该如何解决

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:37:53
Original
793 people have browsed it

关于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>
Copy after login
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
How to create an array within an array?
From 1970-01-01 08:00:00
0
0
0
php array
From 1970-01-01 08:00:00
0
0
0
Array to array
From 1970-01-01 08:00:00
0
0
0
php array rotation
From 1970-01-01 08:00:00
0
0
0
array
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template