Generates the require_once statement for service includes.
string $id The service id:
Definition $definition:
string
private function addServiceInclude($id, $definition) {
$template = " require_once %s;\n";
$code = '';
if (null !== ($file = $definition
->getFile())) {
$code .= sprintf($template, $this
->dumpValue($file));
}
foreach ($this
->getInlinedDefinitions($definition) as $definition) {
if (null !== ($file = $definition
->getFile())) {
$code .= sprintf($template, $this
->dumpValue($file));
}
}
if ('' !== $code) {
$code .= "\n";
}
return $code;
}