Source for file IPermissionAssertion.php

Documentation is available at IPermissionAssertion.php

  1. 1: <?php
  2. 2:  
  3. 3: /**
  4. 4:  * Nette Framework
  5. 5:  *
  6. 6:  * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
  7. 7:  *
  8. 8:  * This source file is subject to the "Nette license" that is bundled
  9. 9:  * with this package in the file license.txt.
  10. 10:  *
  11. 11:  * For more information please see http://nettephp.com
  12. 12:  *
  13. 13:  * @copyright  Copyright (c) 2004, 2009 David Grudl
  14. 14:  * @license    http://nettephp.com/license  Nette license
  15. 15:  * @link       http://nettephp.com
  16. 16:  * @category   Nette
  17. 17:  * @package    Nette\Security
  18. 18:  */
  19. 19:  
  20. 20:  
  21. 21:  
  22. 22: /**
  23. 23:  * Represents conditional ACL Rules with Assertions.
  24. 24:  *
  25. 25:  * @author     David Grudl
  26. 26:  * @copyright  Copyright (c) 2004, 2009 David Grudl
  27. 27:  * @package    Nette\Security
  28. 28:  */
  29. 30: {
  30. 31:     /**
  31. 32:      * Returns true if and only if the assertion conditions are met.
  32. 33:      *
  33. 34:      * This method is passed the ACL, Role, Resource, and privilege to which the authorization query applies. If the
  34. 35:      * $role, $resource, or $privilege parameters are Permission::ALL, it means that the query applies to all Roles,
  35. 36:      * Resources, or privileges, respectively.
  36. 37:      *
  37. 38:      * @param  Permission 
  38. 39:      * @param  string  role
  39. 40:      * @param  string  resource
  40. 41:      * @param  string|NULL privilege
  41. 42:      * @return bool 
  42. 43:      */
  43. 44:     public function assert(Permission $acl$roleId$resourceId$privilege);
  44. 45: }