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