src/acdhOeaw/util/metadataValidator/MetadataValidator.php
static private function checkClass(Resource $res, Fedora $fedora): array {
        if (self::$classes === null) {
            self::loadClasses($fedora);
        }
        $ret = array();
        foreach ($res->allResources(self::RDFS_TYPE) as $i) {
            $i = $i->getUri();
            if (!isset(self::$classes[$i])) {
                $ret[] = new Error($res->getUri(), 'unknown class', $i);
            }
        }
        return $ret;
    }
static private function checkClass(Resource $res, Fedora $fedora): array {
        if (self::$classes === null) {
            self::loadClasses($fedora);
        }
        $ret = array();
        foreach ($res->allResources(self::RDFS_TYPE) as $i) {
            $i = $i->getUri();
            if (!isset(self::$classes[$i])) {
                $ret[] = new Error($res->getUri(), 'unknown class', $i);
            }
        }
        return $ret;
    }
static private function checkClass ( Resource $ res , Fedora $ fedora ) : array { if ( self :: $ classes === null ) { self :: loadClasses ( $ fedora ) ; } $ ret = array ( ) ; foreach ( $ res -> allResources ( self :: RDFS_TYPE ) as $ i ) { $ i = $ i -> getUri ( ) ; if ( ! isset ( self :: $ classes [ $ i ] ) ) { $ ret [ ] = new Error ( $ res -> getUri ( ) , 'unknown class' , $ i ) ; } } return $ ret ; }
Checks if a resource is of known class
@param Resource $res resource to be checked
@param Fedora $fedora repository connection object
@return array list of errors
Checks if a resource is of known class