src/acdhOeaw/fedora/acl/WebAcl.php
public function revokeAll(int $mode = WebAclRule::READ): WebAcl {
        WebAclRule::checkMode($mode);

        if ($mode == WebAclRule::WRITE) {
            foreach ($this->resRules as $i) {
                $i->setMode(WebAclRule::READ);
                if (self::$autosave) {
                    $i->save($this->res->getAclUrl());
                }
            }
        } else {
            foreach ($this->resRules as $i) {
                $i->delete(true);
            }
            $this->resRules = array();
        }

        return $this;
    }
public function revokeAll(int $mode = WebAclRule::READ): WebAcl {
        WebAclRule::checkMode($mode);

        if ($mode == WebAclRule::WRITE) {
            foreach ($this->resRules as $i) {
                $i->setMode(WebAclRule::READ);
                if (self::$autosave) {
                    $i->save($this->res->getAclUrl());
                }
            }
        } else {
            foreach ($this->resRules as $i) {
                $i->delete(true);
            }
            $this->resRules = array();
        }

        return $this;
    }
public function revokeAll ( int $ mode = WebAclRule :: READ ) : WebAcl { WebAclRule :: checkMode ( $ mode ) ; if ( $ mode == WebAclRule :: WRITE ) { foreach ( $ this -> resRules as $ i ) { $ i -> setMode ( WebAclRule :: READ ) ; if ( self :: $ autosave ) { $ i -> save ( $ this -> res -> getAclUrl ( ) ) ; } } } else { foreach ( $ this -> resRules as $ i ) { $ i -> delete ( true ) ; } $ this -> resRules = array ( ) ; } return $ this ; }
Revokes privileges from all users, groups and classes for a given
Fedora resource.

Only rules directly targeting the given resource are removed.
Rules inherited from Fedora parents sharing the same ACL are not affected.

If `$mode` equals to `WebAclRule::WRITE` all privileges are limited to
`WebAclRule::READ`.

If `$mode` equals to `WebAclRule::READ` all privileges are revoked.
@param int $mode WebAclRule::READ or WebAclRule::WRITE
@return \acdhOeaw\fedora\acl\WebAcl
Revokes privileges from all users groups and classes for a given Fedora resource .