public function Definition::setFactoryClass in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Definition.php \Symfony\Component\DependencyInjection\Definition::setFactoryClass()
Sets the name of the class that acts as a factory using the factory method, which will be invoked statically.
@api
Parameters
string $factoryClass The factory class name:
Return value
Definition The current instance
Deprecated
since version 2.6, to be removed in 3.0.
1 call to Definition::setFactoryClass()
- DefinitionDecorator::setFactoryClass in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ DefinitionDecorator.php - @api
1 method overrides Definition::setFactoryClass()
- DefinitionDecorator::setFactoryClass in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ DefinitionDecorator.php - @api
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Definition.php, line 99
Class
- Definition
- Definition represents a service definition.
Namespace
Symfony\Component\DependencyInjectionCode
public function setFactoryClass($factoryClass) {
trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryClass), E_USER_DEPRECATED);
$this->factoryClass = $factoryClass;
return $this;
}