src/Authorization/SecuredAccessTrait.php
public function addAllowedRole($role, $attribute = 'access')
    {
        $roleStr = (string) $role;
        if (!isset($this->allowedRoles[$roleStr])) {
            $this->allowedRoles[$roleStr] = array();
        }
        $this->allowedRoles[$roleStr][(string) $attribute] = true;
        return $this;
    }
public function addAllowedRole($role, $attribute = 'access')
    {
        $roleStr = (string) $role;
        if (!isset($this->allowedRoles[$roleStr])) {
            $this->allowedRoles[$roleStr] = array();
        }
        $this->allowedRoles[$roleStr][(string) $attribute] = true;
        return $this;
    }
public function addAllowedRole ( $ role , $ attribute = 'access' ) { $ roleStr = ( string ) $ role ; if ( ! isset ( $ this -> allowedRoles [ $ roleStr ] ) ) { $ this -> allowedRoles [ $ roleStr ] = array ( ) ; } $ this -> allowedRoles [ $ roleStr ] [ ( string ) $ attribute ] = true ; return $ this ; }
Allow user role to access
@param string $role User role to allow access
@param string $attribute Attribute
@return self $this object (to allow method chaining)
Allow user role to access