private function PhpDumper::isSimpleInstance in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/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 vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php - Generates the inline definition setup.
- PhpDumper::addServiceInstance in vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php - Generates the service instance.
- PhpDumper::addServiceReturn in vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php - Adds the service return statement.
File
- vendor/
symfony/ dependency-injection/ 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;
}