public function render($ret = false)
{
$this->docblock = new DocblockGenerator(null, $this->indent);
$this->docblock->setTag('namespace');
$this->output = $this->docblock->render(true);
$this->output .= $this->indent . 'namespace ' . $this->namespace . ';' . PHP_EOL;
if (count($this->use) > 0) {
$this->output .= PHP_EOL;
foreach ($this->use as $ns => $as) {
$this->output .= $this->indent . 'use ';
$this->output .= $ns;
if (null !== $as) {
$this->output .= ' as ' . $as;
}
$this->output .= ';' . PHP_EOL;
}
}
if ($ret) {
return $this->output;
} else {
echo $this->output;
}
}