src/acdhOeaw/fedora/acl/WebAclRule.php
public function makeValid(): array {
        if ($this->isValid()) {
            return array($this);
        }

        $ret = array();
        foreach ($this->resources as $uri => $res) {
            $tmp            = clone($this);
            $tmp->uri       = '';
            $tmp->resources = array($uri => $res);
            $tmp->classes   = array();
            $ret[]          = $tmp;
        }
        foreach ($this->classes as $class) {
            $tmp            = clone($this);
            $tmp->uri       = '';
            $tmp->resources = array();
            $tmp->classes   = array($class => $class);
            $ret[]          = $tmp;
        }
        return $ret;
    }
public function makeValid(): array {
        if ($this->isValid()) {
            return array($this);
        }

        $ret = array();
        foreach ($this->resources as $uri => $res) {
            $tmp            = clone($this);
            $tmp->uri       = '';
            $tmp->resources = array($uri => $res);
            $tmp->classes   = array();
            $ret[]          = $tmp;
        }
        foreach ($this->classes as $class) {
            $tmp            = clone($this);
            $tmp->uri       = '';
            $tmp->resources = array();
            $tmp->classes   = array($class => $class);
            $ret[]          = $tmp;
        }
        return $ret;
    }
public function makeValid ( ) : array { if ( $ this -> isValid ( ) ) { return array ( $ this ) ; } $ ret = array ( ) ; foreach ( $ this -> resources as $ uri => $ res ) { $ tmp = clone ( $ this ) ; $ tmp -> uri = '' ; $ tmp -> resources = array ( $ uri => $ res ) ; $ tmp -> classes = array ( ) ; $ ret [ ] = $ tmp ; } foreach ( $ this -> classes as $ class ) { $ tmp = clone ( $ this ) ; $ tmp -> uri = '' ; $ tmp -> resources = array ( ) ; $ tmp -> classes = array ( $ class => $ class ) ; $ ret [ ] = $ tmp ; } return $ ret ; }
Returns collection of WebAclRule objects each describing exactly one
resource or class.
@return array
@see isValid()
Returns collection of WebAclRule objects each describing exactly one resource or class .