concrete/src/Support/Symbol/ClassSymbol/ClassSymbol.php
public function render($eol = "\n", $padding = '    ', $methodFilter = null)
    {
        $rendered = '';
        $comment = $this->comment;
        if ($comment !== false) {
            $comment = trim($comment);
            if ($comment !== '') {
                $rendered .= str_replace($eol . '*', $eol . ' *', implode($eol, array_map('trim', explode("\n", $comment)))) . $eol;
            }
        }
        if ($this->reflectionClass->isAbstract()) {
            $rendered .= 'abstract ';
        }
        $rendered .= 'class ' . $this->aliasBasename . ' extends \\' . $this->fqn . "{$eol}{{$eol}";
        $firstMethod = true;
        foreach ($this->methods as $method) {
            if (is_callable($methodFilter) && (call_user_func($methodFilter, $this, $method) === false)) {
                continue;
            }
            if ($firstMethod) {
                $firstMethod = false;
                if ($this->isFacade()) {
                    $rendered .= $padding . '/**' . $eol . $padding . ' * @var ' . $this->fqn . $eol . $padding . ' */' . $eol;
                    $rendered .= $padding . 'protected static $instance;' . $eol;
                }
            }
            $rendered_method = $method->render($eol, $padding);
            if ($rendered_method !== '') {
                $rendered .= $padding . rtrim(str_replace($eol, $eol . $padding, $rendered_method)) . $eol;
            }
        }
        $rendered .= "}{$eol}";

        return $rendered;
    }
public function render($eol = "\n", $padding = '    ', $methodFilter = null)
    {
        $rendered = '';
        $comment = $this->comment;
        if ($comment !== false) {
            $comment = trim($comment);
            if ($comment !== '') {
                $rendered .= str_replace($eol . '*', $eol . ' *', implode($eol, array_map('trim', explode("\n", $comment)))) . $eol;
            }
        }
        if ($this->reflectionClass->isAbstract()) {
            $rendered .= 'abstract ';
        }
        $rendered .= 'class ' . $this->aliasBasename . ' extends \\' . $this->fqn . "{$eol}{{$eol}";
        $firstMethod = true;
        foreach ($this->methods as $method) {
            if (is_callable($methodFilter) && (call_user_func($methodFilter, $this, $method) === false)) {
                continue;
            }
            if ($firstMethod) {
                $firstMethod = false;
                if ($this->isFacade()) {
                    $rendered .= $padding . '/**' . $eol . $padding . ' * @var ' . $this->fqn . $eol . $padding . ' */' . $eol;
                    $rendered .= $padding . 'protected static $instance;' . $eol;
                }
            }
            $rendered_method = $method->render($eol, $padding);
            if ($rendered_method !== '') {
                $rendered .= $padding . rtrim(str_replace($eol, $eol . $padding, $rendered_method)) . $eol;
            }
        }
        $rendered .= "}{$eol}";

        return $rendered;
    }
public function render ( $ eol = "\n" , $ padding = '    ' , $ methodFilter = null ) { $ rendered = '' ; $ comment = $ this -> comment ; if ( $ comment !== false ) { $ comment = trim ( $ comment ) ; if ( $ comment !== '' ) { $ rendered .= str_replace ( $ eol . '*' , $ eol . ' *' , implode ( $ eol , array_map ( 'trim' , explode ( "\n" , $ comment ) ) ) ) . $ eol ; } } if ( $ this -> reflectionClass -> isAbstract ( ) ) { $ rendered .= 'abstract ' ; } $ rendered .= 'class ' . $ this -> aliasBasename . ' extends \\' . $ this -> fqn . "{$eol}{{$eol}" ; $ firstMethod = true ; foreach ( $ this -> methods as $ method ) { if ( is_callable ( $ methodFilter ) && ( call_user_func ( $ methodFilter , $ this , $ method ) === false ) ) { continue ; } if ( $ firstMethod ) { $ firstMethod = false ; if ( $ this -> isFacade ( ) ) { $ rendered .= $ padding . '/**' . $ eol . $ padding . ' * @var ' . $ this -> fqn . $ eol . $ padding . ' */' . $ eol ; $ rendered .= $ padding . 'protected static $instance;' . $ eol ; } } $ rendered_method = $ method -> render ( $ eol , $ padding ) ; if ( $ rendered_method !== '' ) { $ rendered .= $ padding . rtrim ( str_replace ( $ eol , $ eol . $ padding , $ rendered_method ) ) . $ eol ; } } $ rendered .= "}{$eol}" ; return $ rendered ; }
Render Class with methods.

@param string $eol
@param string $padding
@param callable|null $methodFilter

@return string
Render Class with methods .