Esempio n. 1
0
 /**
  * Dump a Structure (Object) to the screen.
  *
  * @param Structure $structure
  */
 private function buildStructure(Structure $structure)
 {
     $abstractOrFinal = $structure->isAbstract() ? 'abstract ' : $structure->isFinal() ? 'final ' : '';
     $this->dump .= sprintf('<samp class="parent">%sclass %s %s %s<span class="arrow"></span> {', $abstractOrFinal, $structure->getNamespace() ?: $structure->getName(), $structure->getParent(), $structure->getInterfaces());
     $this->dump .= sprintf('<samp class="child">id : %s</samp>', $structure->getId());
     $this->dump .= sprintf('<samp class="child">traits : %s </samp>', $structure->getTraits());
     if ($structure->hasProperties()) {
         $this->dump .= '<samp class="parent child"> properties : <span class="arrow"></span> {';
         foreach ($structure->getProperties() as $property) {
             $this->buildType($property);
         }
         $this->dump .= '}</samp>';
     }
     if ($structure->hasMethods()) {
         $this->dump .= '<samp class="parent child"> methods : <span class="arrow"></span> {';
         foreach ($structure->getMethods() as $method) {
             $this->buildType($method);
         }
         $this->dump .= '}</samp>';
     }
     $this->dump .= '}</samp>';
 }