Exemplo n.º 1
0
 public function testAppendingANewElementWithinANamespaceByPrefix()
 {
     $this->dom->registerNamespace('t', 'test:uri');
     $node = $this->node->appendElementPrefix('t', 'append', 'text');
     $this->assertInstanceOf('TheSeer\\fDOM\\fDOMElement', $node);
     $this->assertEquals(1, $this->node->query('count(t:append)'));
     $this->assertEquals('text', $node->nodeValue);
 }
Exemplo n.º 2
0
 /**
  * @return array
  */
 public function getConstants() {
     $result = array();
     $xpath = 'phpdox:constant';
     foreach($this->rootNode->query($xpath) as $node) {
         $result[] = new ConstantObject($node);
     }
     return $result;
 }
Exemplo n.º 3
0
 public function getActiveEnrichSources()
 {
     if (!is_array($this->enrichers)) {
         $this->enrichers = array();
         foreach ($this->ctx->query('cfg:enrich/cfg:source[@type and (not(@enabled) or @enabled="true")]') as $ctx) {
             $this->enrichers[$ctx->getAttribute('type')] = new EnrichConfig($this, $ctx);
         }
         if (!isset($this->enrichers['build'])) {
             $ctx = $this->ctx->ownerDocument->createElementNS('http://xml.phpdox.net/config', 'source');
             $ctx->setAttribute('type', 'build');
             $this->enrichers['build'] = new EnrichConfig($this, $ctx);
         }
     }
     return $this->enrichers;
 }
Exemplo n.º 4
0
 private function importDirNode(fDOMElement $dir, $path) {
     $path .=  $dir->getAttribute('name');
     foreach($dir->query('phpdox:file') as $file) {
         $this->original[ $path . '/' . $file->getAttribute('name')] = $file;
     }
     foreach($dir->query('phpdox:dir') as $child) {
         $this->importDirNode($child, $path . '/');
     }
 }
Exemplo n.º 5
0
 public function hasInheritDoc() {
     return $this->ctx->query('phpdox:docblock[@inherit="true"]')->length > 0;
 }
Exemplo n.º 6
0
 /**
  * @return ParameterCollection
  */
 public function getParameters()
 {
     return new ParameterCollection($this->element->query('src:parameter'), $this->element->query('src:docblock/src:param'), $this);
 }
Exemplo n.º 7
0
 public function isAliased($methodName)
 {
     return $this->ctx->query(sprintf('phpdox:alias[@method = "%s"]', $methodName))->length > 0;
 }