Adds the constructor.
string
private function addConstructor() {
$arguments = $this->container
->getParameterBag()
->all() ? 'new ParameterBag($this->getDefaultParameters())' : null;
$code = <<<EOF
/**
* Constructor.
*/
public function __construct()
{
parent::__construct({<span class="php-variable">$arguments</span>});
EOF;
if (count($scopes = $this->container
->getScopes()) > 0) {
$code .= "\n";
$code .= " \$this->scopes = " . $this
->dumpValue($scopes) . ";\n";
$code .= " \$this->scopeChildren = " . $this
->dumpValue($this->container
->getScopeChildren()) . ";\n";
}
$code .= <<<EOF
}
EOF;
return $code;
}