MutableAclInterface.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Security\Acl\Model;
  11. /**
  12. * This interface adds mutators for the AclInterface.
  13. *
  14. * All changes to Access Control Entries must go through this interface. Access
  15. * Control Entries must never be modified directly.
  16. *
  17. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  18. */
  19. interface MutableAclInterface extends AclInterface
  20. {
  21. /**
  22. * Deletes a class-based ACE
  23. *
  24. * @param integer $index
  25. * @return void
  26. */
  27. function deleteClassAce($index);
  28. /**
  29. * Deletes a class-field-based ACE
  30. *
  31. * @param integer $index
  32. * @param string $field
  33. * @return void
  34. */
  35. function deleteClassFieldAce($index, $field);
  36. /**
  37. * Deletes an object-based ACE
  38. *
  39. * @param integer $index
  40. * @return void
  41. */
  42. function deleteObjectAce($index);
  43. /**
  44. * Deletes an object-field-based ACE
  45. *
  46. * @param integer $index
  47. * @param string $field
  48. * @return void
  49. */
  50. function deleteObjectFieldAce($index, $field);
  51. /**
  52. * Returns the primary key of this ACL
  53. *
  54. * @return integer
  55. */
  56. function getId();
  57. /**
  58. * Inserts a class-based ACE
  59. *
  60. * @param SecurityIdentityInterface $sid
  61. * @param integer $mask
  62. * @param integer $index
  63. * @param Boolean $granting
  64. * @param string $strategy
  65. * @return void
  66. */
  67. function insertClassAce(SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null);
  68. /**
  69. * Inserts a class-field-based ACE
  70. *
  71. * @param string $field
  72. * @param SecurityIdentityInterface $sid
  73. * @param integer $mask
  74. * @param integer $index
  75. * @param Boolean $granting
  76. * @param string $strategy
  77. * @return void
  78. */
  79. function insertClassFieldAce($field, SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null);
  80. /**
  81. * Inserts an object-based ACE
  82. *
  83. * @param SecurityIdentityInterface $sid
  84. * @param integer $mask
  85. * @param integer $index
  86. * @param Boolean $granting
  87. * @param string $strategy
  88. * @return void
  89. */
  90. function insertObjectAce(SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null);
  91. /**
  92. * Inserts an object-field-based ACE
  93. *
  94. * @param string $field
  95. * @param SecurityIdentityInterface $sid
  96. * @param integer $mask
  97. * @param integer $index
  98. * @param Boolean $granting
  99. * @param string $strategy
  100. * @return void
  101. */
  102. function insertObjectFieldAce($field, SecurityIdentityInterface $sid, $mask, $index = 0, $granting = true, $strategy = null);
  103. /**
  104. * Sets whether entries are inherited
  105. *
  106. * @param Boolean $boolean
  107. * @return void
  108. */
  109. function setEntriesInheriting($boolean);
  110. /**
  111. * Sets the parent ACL
  112. *
  113. * @param AclInterface $acl
  114. * @return void
  115. */
  116. function setParentAcl(AclInterface $acl);
  117. /**
  118. * Updates a class-based ACE
  119. *
  120. * @param integer $index
  121. * @param integer $mask
  122. * @param string $strategy if null the strategy should not be changed
  123. * @return void
  124. */
  125. function updateClassAce($index, $mask, $strategy = null);
  126. /**
  127. * Updates a class-field-based ACE
  128. *
  129. * @param integer $index
  130. * @param string $field
  131. * @param integer $mask
  132. * @param string $strategy if null the strategy should not be changed
  133. * @return void
  134. */
  135. function updateClassFieldAce($index, $field, $mask, $strategy = null);
  136. /**
  137. * Updates an object-based ACE
  138. *
  139. * @param integer $index
  140. * @param integer $mask
  141. * @param string $strategy if null the strategy should not be changed
  142. * @return void
  143. */
  144. function updateObjectAce($index, $mask, $strategy = null);
  145. /**
  146. * Updates an object-field-based ACE
  147. *
  148. * @param integer $index
  149. * @param string $field
  150. * @param integer $mask
  151. * @param string $strategy if null the strategy should not be changed
  152. * @return void
  153. */
  154. function updateObjectFieldAce($index, $field, $mask, $strategy = null);
  155. }