/** Get a the prefix of the namespace that this resource is part of
  *
  * This method will return null the resource isn't part of any
  * registered namespace.
  *
  * @return string The namespace prefix of the resource (e.g. foaf)
  */
 public function prefix()
 {
     return EasyRdf_Namespace::prefixOfUri($this->_uri);
 }
 public function testPrefixOfUriNonString()
 {
     $this->setExpectedException('InvalidArgumentException', '$uri should be a string or EasyRdf_Resource');
     EasyRdf_Namespace::prefixOfUri(array());
 }
Exemple #3
0
 public function testPrefixOfUriNonString()
 {
     $this->setExpectedException('InvalidArgumentException');
     EasyRdf_Namespace::prefixOfUri(array());
 }