/** * Gets the names of all classes known to this driver. * * @return array The names of all classes known to this driver. */ public function testGetAllNames() { $map = $this->driver->getAllNames(); $this->assertCount(1, $map); $types = array('http://rdfs.org/sioc/ns#Post' => 'Test\\Midgard\\CreatePHP\\Model'); $this->assertEquals($types, $map); }
/** * Get the type information by (full) RDF name * * @param string $rdf * * @return TypeInterface */ public function getTypeByRdf($rdf) { $map = $this->driver->getAllNames(); if (!isset($map[$rdf])) { throw new TypeNotFoundException("No type for {$rdf}"); } return $this->getTypeByName($map[$rdf]); }