src/acdhOeaw/fedora/acl/WebAcl.php
public function reload(): WebAcl {
        $fedora         = $this->res->getFedora();
        $resUri         = $this->res->getUri(true);
        $aclUri         = $this->res->getAclUrl();
        $this->resRules = [];
        $this->extRules = [];

        if ($aclUri) {
            $query   = new SimpleQuery(self::QUERY, [$resUri, $aclUri]);
            $results = $fedora->runQuery($query);
            $rules   = self::initRules($results, $fedora, $aclUri);
            foreach ($rules as $r) {
                if ($r->hasResource($resUri)) {
                    $this->resRules[] = $r;
                } else {
                    $this->extRules[] = $r;
                }
            }
        }
        return $this;
    }
public function reload(): WebAcl {
        $fedora         = $this->res->getFedora();
        $resUri         = $this->res->getUri(true);
        $aclUri         = $this->res->getAclUrl();
        $this->resRules = [];
        $this->extRules = [];

        if ($aclUri) {
            $query   = new SimpleQuery(self::QUERY, [$resUri, $aclUri]);
            $results = $fedora->runQuery($query);
            $rules   = self::initRules($results, $fedora, $aclUri);
            foreach ($rules as $r) {
                if ($r->hasResource($resUri)) {
                    $this->resRules[] = $r;
                } else {
                    $this->extRules[] = $r;
                }
            }
        }
        return $this;
    }
public function reload ( ) : WebAcl { $ fedora = $ this -> res -> getFedora ( ) ; $ resUri = $ this -> res -> getUri ( true ) ; $ aclUri = $ this -> res -> getAclUrl ( ) ; $ this -> resRules = [ ] ; $ this -> extRules = [ ] ; if ( $ aclUri ) { $ query = new SimpleQuery ( self :: QUERY , [ $ resUri , $ aclUri ] ) ; $ results = $ fedora -> runQuery ( $ query ) ; $ rules = self :: initRules ( $ results , $ fedora , $ aclUri ) ; foreach ( $ rules as $ r ) { if ( $ r -> hasResource ( $ resUri ) ) { $ this -> resRules [ ] = $ r ; } else { $ this -> extRules [ ] = $ r ; } } } return $ this ; }
Reloads access rules by quering a triplestore.
See class description for use cases.
Reloads access rules by quering a triplestore . See class description for use cases .