private function PhpDumper::isSimpleInstance in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php \Symfony\Component\DependencyInjection\Dumper\PhpDumper::isSimpleInstance()
Checks if the definition is a simple instance.
Parameters
string $id:
Definition $definition:
Return value
bool
3 calls to PhpDumper::isSimpleInstance()
- PhpDumper::addServiceInlinedDefinitionsSetup in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ PhpDumper.php - Generates the inline definition setup.
- PhpDumper::addServiceInstance in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ PhpDumper.php - Generates the service instance.
- PhpDumper::addServiceReturn in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ PhpDumper.php - Adds the service return statement.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ PhpDumper.php, line 417
Class
- PhpDumper
- PhpDumper dumps a service container as a PHP class.
Namespace
Symfony\Component\DependencyInjection\DumperCode
private function isSimpleInstance($id, $definition) {
foreach (array_merge(array(
$definition,
), $this
->getInlinedDefinitions($definition)) as $sDefinition) {
if ($definition !== $sDefinition && !$this
->hasReference($id, $sDefinition
->getMethodCalls())) {
continue;
}
if ($sDefinition
->getMethodCalls() || $sDefinition
->getProperties() || $sDefinition
->getConfigurator()) {
return false;
}
}
return true;
}