示例#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);
 }
 /**
  * @return array
  */
 public function getConstants() {
     $result = array();
     $xpath = 'phpdox:constant';
     foreach($this->rootNode->query($xpath) as $node) {
         $result[] = new ConstantObject($node);
     }
     return $result;
 }
示例#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;
 }
示例#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 . '/');
     }
 }
示例#5
0
 public function hasInheritDoc() {
     return $this->ctx->query('phpdox:docblock[@inherit="true"]')->length > 0;
 }
示例#6
0
文件: Method.php 项目: renanbr/phpact
 /**
  * @return ParameterCollection
  */
 public function getParameters()
 {
     return new ParameterCollection($this->element->query('src:parameter'), $this->element->query('src:docblock/src:param'), $this);
 }
示例#7
0
 public function isAliased($methodName)
 {
     return $this->ctx->query(sprintf('phpdox:alias[@method = "%s"]', $methodName))->length > 0;
 }