示例#1
0
 /**
  * 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);
 }
示例#2
0
 /**
  * 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]);
 }