Inheritance: extends AbstractEvent
Beispiel #1
0
 public function enrichEnd(PHPDoxEndEvent $event)
 {
     $index = $event->getIndex()->asDom();
     foreach ($this->results as $namespace => $classes) {
         foreach ($classes as $class => $results) {
             $classNode = $index->queryOne(sprintf('//phpdox:namespace[@name = "%s"]/phpdox:class[@name = "%s"]', $namespace, $class));
             if (!$classNode) {
                 continue;
             }
             $container = $this->getEnrichtmentContainer($classNode, 'phpunit');
             $resultNode = $container->appendElementNS(self::XMLNS, 'result');
             foreach ($results as $key => $value) {
                 $resultNode->setAttribute(strtolower($key), $value);
             }
         }
     }
 }
Beispiel #2
0
 private function generateIndex(PHPDoxEndEvent $event)
 {
     $proc = $this->getXSLTProcessor('index.xsl');
     $proc->setParameter('', 'project', $this->projectNode->getAttribute('name'));
     $html = $proc->transformToDoc($event->getIndex()->asDom());
     $this->saveDomDocument($html, $this->outputDir . '/index.' . $this->extension);
     $proc = $this->getXSLTProcessor('namespaces.xsl');
     $html = $proc->transformToDoc($event->getIndex()->asDom());
     $this->saveDomDocument($html, $this->outputDir . '/namespaces.' . $this->extension);
     $proc = $this->getXSLTProcessor('units.xsl');
     $html = $proc->transformToDoc($event->getIndex()->asDom());
     $this->saveDomDocument($html, $this->outputDir . '/classes.' . $this->extension);
     $proc->setParameter('', 'mode', 'interface');
     $proc->setParameter('', 'title', 'Interfaces');
     $html = $proc->transformToDoc($event->getIndex()->asDom());
     $this->saveDomDocument($html, $this->outputDir . '/interfaces.' . $this->extension);
     $proc->setParameter('', 'mode', 'trait');
     $proc->setParameter('', 'title', 'Traits');
     $html = $proc->transformToDoc($event->getIndex()->asDom());
     $this->saveDomDocument($html, $this->outputDir . '/traits.' . $this->extension);
 }
Beispiel #3
0
 public function handleIndex(PHPDoxEndEvent $event)
 {
     $dom = $event->getIndex()->asDom();
     $this->saveDomDocument($dom, $this->outputDir . '/index.xml');
 }
Beispiel #4
0
 public function buildFinish(PHPDoxEndEvent $event)
 {
     $this->renderIndexPages($event->getIndex()->asDom());
     $this->renderSourceIndexes($event->getTree()->asDom());
     $this->copyStatic($this->resourceDir, $this->outputDir, TRUE);
 }