Nette\PhpGenerator\PhpFile::__toString PHP Method

__toString() public method

public __toString ( ) : string
return string PHP code
    public function __toString()
    {
        foreach ($this->namespaces as $namespace) {
            $namespace->setBracketedSyntax(count($this->namespaces) > 1 && isset($this->namespaces[NULL]));
        }
        return Strings::normalize("<?php\n" . ($this->comment ? "\n" . str_replace("\n", "\n * ", "/**\n" . $this->comment) . "\n */\n\n" : '') . implode("\n\n", $this->namespaces)) . "\n";
    }