You are here

public function Definition::setFactoryMethod in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Definition.php \Symfony\Component\DependencyInjection\Definition::setFactoryMethod()

Sets the factory method able to create an instance of this class.

Parameters

string $factoryMethod The factory method name:

Return value

Definition The current instance

Deprecated

since version 2.6, to be removed in 3.0.

1 call to Definition::setFactoryMethod()
DefinitionDecorator::setFactoryMethod in vendor/symfony/dependency-injection/DefinitionDecorator.php
Sets the factory method able to create an instance of this class.
1 method overrides Definition::setFactoryMethod()
DefinitionDecorator::setFactoryMethod in vendor/symfony/dependency-injection/DefinitionDecorator.php
Sets the factory method able to create an instance of this class.

File

vendor/symfony/dependency-injection/Definition.php, line 128

Class

Definition
Definition represents a service definition.

Namespace

Symfony\Component\DependencyInjection

Code

public function setFactoryMethod($factoryMethod) {
  @trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryMethod), E_USER_DEPRECATED);
  $this->factoryMethod = $factoryMethod;
  return $this;
}