title: Building a generic OO ACL using Doctrine
body: <p>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.</p>
  
  <p>Right now I'm looking at making it based on classes and unique identifiers, storing them in a table as such:</p>
  
  <pre><code>Table: ACL
      ResourceClass
      ResourceKey
      RoleClass
      RoleKey
      Permission
  </code></pre>
  
  <p>Obviously this is going to demand that I introspect on classes that are being queried to derive the correct ResourceClass values.</p>
  
  <p>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.</p>
  
  <p>I'm not a huge fan of Zend ACL, so please no suggestions for it - I am aware of it!</p>
  
  <p>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! ;)</p>