Esempio n. 1
0
 public function testUrnCompare()
 {
     $urns = array('URN:foo:a123,456', 'urn:foo:a123,456', 'urn:FOO:a123,456', 'urn:foo:A123,456', 'urn:foo:a123%2C456', 'URN:FOO:a123%2c456');
     foreach ($urns as $rawUrn) {
         $urn = new Urn($rawUrn);
         $this->assertEquals('urn:foo:a123,456', $urn->__toString());
     }
 }
 public function getKnownSubSchemes()
 {
     return array_merge(Urn::create()->getKnownSubSchemes(), Url::create()->getKnownSubSchemes());
 }
 public static function getKnownSubSchemes()
 {
     return array_merge(Urn::getKnownSubSchemes(), Url::getKnownSubSchemes());
 }
 /**
  * @param string $name_
  *
  * @return \Components\Entity_Collection
  */
 public static function collection($name_, Persistence_Properties $properties_ = null)
 {
     $urn = Urn::valueOf($name_);
     if ('urn' === $urn->getScheme()) {
         throw new Exception_IllegalArgument('components/persistence', 'Argument must be formatted like: resource:entity/name.');
     }
     if (false === isset(self::$m_resources[$urn->getScheme()])) {
         static::resource($urn->getScheme());
     }
     return self::$m_resources[$urn->getScheme()]->view($urn->getNamespace(), $properties_)->collection();
 }