1. <small id='8Rzr8'></small><noframes id='8Rzr8'>

      <tfoot id='8Rzr8'></tfoot>
        <bdo id='8Rzr8'></bdo><ul id='8Rzr8'></ul>
      <legend id='8Rzr8'><style id='8Rzr8'><dir id='8Rzr8'><q id='8Rzr8'></q></dir></style></legend>

        <i id='8Rzr8'><tr id='8Rzr8'><dt id='8Rzr8'><q id='8Rzr8'><span id='8Rzr8'><b id='8Rzr8'><form id='8Rzr8'><ins id='8Rzr8'></ins><ul id='8Rzr8'></ul><sub id='8Rzr8'></sub></form><legend id='8Rzr8'></legend><bdo id='8Rzr8'><pre id='8Rzr8'><center id='8Rzr8'></center></pre></bdo></b><th id='8Rzr8'></th></span></q></dt></tr></i><div id='8Rzr8'><tfoot id='8Rzr8'></tfoot><dl id='8Rzr8'><fieldset id='8Rzr8'></fieldset></dl></div>
      1. 使用 Doctrine 构建通用 OO ACL

        时间:2024-08-09
      2. <small id='I3f3l'></small><noframes id='I3f3l'>

          <bdo id='I3f3l'></bdo><ul id='I3f3l'></ul>
          <i id='I3f3l'><tr id='I3f3l'><dt id='I3f3l'><q id='I3f3l'><span id='I3f3l'><b id='I3f3l'><form id='I3f3l'><ins id='I3f3l'></ins><ul id='I3f3l'></ul><sub id='I3f3l'></sub></form><legend id='I3f3l'></legend><bdo id='I3f3l'><pre id='I3f3l'><center id='I3f3l'></center></pre></bdo></b><th id='I3f3l'></th></span></q></dt></tr></i><div id='I3f3l'><tfoot id='I3f3l'></tfoot><dl id='I3f3l'><fieldset id='I3f3l'></fieldset></dl></div>

          <legend id='I3f3l'><style id='I3f3l'><dir id='I3f3l'><q id='I3f3l'></q></dir></style></legend>

              <tfoot id='I3f3l'></tfoot>
                  <tbody id='I3f3l'></tbody>

                • 本文介绍了使用 Doctrine 构建通用 OO ACL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我希望设计一个由原则支持的 ACL 系统供我自己使用,尽管我在一些最初的设计考虑方面遇到了困难.

                  I'm looking to design a doctrine-backed ACL system for my own use, although I'm struggling with some of the initial design considerations.

                  现在我正在考虑根据类和唯一标识符来制作它,并将它们存储在一个表中:

                  Right now I'm looking at making it based on classes and unique identifiers, storing them in a table as such:

                  Table: ACL
                      ResourceClass
                      ResourceKey
                      RoleClass
                      RoleKey
                      Permission
                  

                  显然,这将要求我对正在查询的类进行内省以派生正确的 ResourceClass 值.

                  Obviously this is going to demand that I introspect on classes that are being queried to derive the correct ResourceClass values.

                  我想知道这种方法以前是否已经使用过,或者是否有人对以更好的方式进行操作有一些建议.角色之间的递归关系等其他事情也让我感到困惑,因为我不确定如何递归查询以构建资源和 ACL.

                  I'm wondering if this approach has been done before or if anyone has some advice with doing it in a bettery way. Other things like recursive relationships between Roles also confound me as I'm not sure how to recursively query to build and ACL for a Resource.

                  我不是 Zend ACL 的忠实拥护者,因此请不要提出任何建议 - 我知道!

                  I'm not a huge fan of Zend ACL, so please no suggestions for it - I am aware of it!

                  随着人们的加入,我们会进一步澄清这个问题,所以请多多包涵!这个问题本身可能需要几次迭代!;)

                  Further clarifications will be made to this question as people weigh in, so please bear with me! This question itself may require a few iterations! ;)

                  推荐答案

                  我使用 NestedSet 来存储 ACL 层次结构和缓存以加快速度.

                  I use NestedSet for storing the ACL hierarchy and cache to speed things up.

                  Doctrine ORM for PHP - NestedSet

                  这是一个可能也有用的帖子:

                  Here is a post which may be useful too:

                  Zend_Acl 部分3:创建和存储动态ACL |CodeUtopia - Jani Hartikainen 的博客

                  (也请看前两部分).

                  这篇关于使用 Doctrine 构建通用 OO ACL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:带有“或条件"的学说 FindBy 方法? 下一篇:教义 findBy* 方法和获取数组

                  相关文章

                • <tfoot id='sI6IC'></tfoot>
                  • <bdo id='sI6IC'></bdo><ul id='sI6IC'></ul>
                  <legend id='sI6IC'><style id='sI6IC'><dir id='sI6IC'><q id='sI6IC'></q></dir></style></legend>

                      <small id='sI6IC'></small><noframes id='sI6IC'>

                    1. <i id='sI6IC'><tr id='sI6IC'><dt id='sI6IC'><q id='sI6IC'><span id='sI6IC'><b id='sI6IC'><form id='sI6IC'><ins id='sI6IC'></ins><ul id='sI6IC'></ul><sub id='sI6IC'></sub></form><legend id='sI6IC'></legend><bdo id='sI6IC'><pre id='sI6IC'><center id='sI6IC'></center></pre></bdo></b><th id='sI6IC'></th></span></q></dt></tr></i><div id='sI6IC'><tfoot id='sI6IC'></tfoot><dl id='sI6IC'><fieldset id='sI6IC'></fieldset></dl></div>