Exemple #1
0
 protected function boot()
 {
     $default = null;
     $reference = false;
     $optional = false;
     $typeHint = null;
     try {
         $class = $this->reflection->getClass();
         if ($class) {
             $typeHint = Doc::factory('\\' . $class->getName(), true)->toArray();
         } elseif ($this->reflection->isArray() === true) {
             $typeHint = 'array';
         }
     } catch (ReflectionException $e) {
     }
     if ($this->reflection->isDefaultValueAvailable()) {
         $default = Helper::varExport($this->reflection->getDefaultValue());
     }
     if ($this->reflection->isPassedByReference()) {
         $reference = true;
     }
     if ($this->reflection->isOptional()) {
         $optional = true;
     }
     $this->attributes = ['name' => $this->reflection->getName(), 'position' => $this->reflection->getPosition(), 'typeHint' => $typeHint, 'default' => $default, 'reference' => $reference, 'optional' => $optional];
     return $this;
 }
Exemple #2
0
    ?>
" id="<?php 
    echo strtolower(str_replace('\\', '-', $namespace));
    ?>
">
                                <div class="page-header">
                                    <h2><?php 
    echo $namespace;
    ?>
</h2>
                                </div>
                                <?php 
    foreach ($items as $class) {
        ?>
                                    <?php 
        echo \Recca0120\Cheatsheet\Parser\Doc::factory($class)->render();
        ?>
                                <?php 
    }
    ?>
                            </div>
                            <?php 
    $i++;
    ?>
                        <?php 
}
?>
                    </div>
                </div>
            </div>
        </div>
Exemple #3
0
 protected function boot()
 {
     $name = $this->reflection->getName();
     $this->attributes = ['name' => $name, 'declare' => Doc::factory($this->reflection->getDeclaringClass(), true)->toArray(), 'comment' => $this->reflection->getDocComment(), 'modifiers' => implode(' ', Reflection::getModifierNames($this->reflection->getModifiers()))];
     return $this;
 }
Exemple #4
0
 protected function boot()
 {
     $this->attributes = ['name' => $this->reflection->getName(), 'declare' => Doc::factory($this->reflection->getDeclaringClass(), true)->toArray(), 'parameters' => $this->getParameters(), 'comment' => $this->reflection->getDocComment(), 'modifiers' => implode(' ', Reflection::getModifierNames($this->reflection->getModifiers())), 'file' => $this->reflection->getFileName(), 'line' => $this->reflection->getStartLine()];
     return $this;
 }