src/acdhOeaw/util/Indexer.php
public function setParent(FedoraResource $resource): Indexer {
        $this->parent = $resource;
        $this->fedora = $this->parent->getFedora();
        $metadata     = $this->parent->getMetadata();
        $locations    = $metadata->allLiterals(RC::locProp());
        foreach ($locations as $i) {
            $loc = preg_replace('|/$|', '', self::containerDir() . $i->getValue());
            if (is_dir($loc)) {
                $this->paths[] = $i->getValue();
            }
        }
        return $this;
    }
public function setParent(FedoraResource $resource): Indexer {
        $this->parent = $resource;
        $this->fedora = $this->parent->getFedora();
        $metadata     = $this->parent->getMetadata();
        $locations    = $metadata->allLiterals(RC::locProp());
        foreach ($locations as $i) {
            $loc = preg_replace('|/$|', '', self::containerDir() . $i->getValue());
            if (is_dir($loc)) {
                $this->paths[] = $i->getValue();
            }
        }
        return $this;
    }
public function setParent ( FedoraResource $ resource ) : Indexer { $ this -> parent = $ resource ; $ this -> fedora = $ this -> parent -> getFedora ( ) ; $ metadata = $ this -> parent -> getMetadata ( ) ; $ locations = $ metadata -> allLiterals ( RC :: locProp ( ) ) ; foreach ( $ locations as $ i ) { $ loc = preg_replace ( '|/$|' , '' , self :: containerDir ( ) . $ i -> getValue ( ) ) ; if ( is_dir ( $ loc ) ) { $ this -> paths [ ] = $ i -> getValue ( ) ; } } return $ this ; }
Sets the parent resource for the indexed files
@param FedoraResource $resource
Sets the parent resource for the indexed files