コード例 #1
0
ファイル: CndWriter.php プロジェクト: frogriotcom/phpcr-utils
 private function checkNamespace($name)
 {
     if (false === strpos($name, ':')) {
         return;
     }
     list($prefix) = explode(':', $name);
     // namespace registry will throw exception if namespace prefix not found
     $this->namespaces[$prefix] = "'" . $this->ns->getURI($prefix) . "'";
 }
コード例 #2
0
 public function testIterator()
 {
     $this->assertTraversableImplemented($this->nr);
     $results = 0;
     foreach ($this->nr as $prefix => $url) {
         $results++;
         $this->assertInternalType('string', $prefix);
         $this->assertInternalType('string', $url);
         $this->assertEquals($url, $this->nr->getURI($prefix));
     }
     $this->assertTrue($results > 3, 'Not enough namespaces');
 }