You are here

public function DefinitionDecorator::setFactory in Zircon Profile 8

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

Sets a factory.

Parameters

string|array $factory A PHP function or an array containing a class/Reference and a method to call:

Return value

Definition The current instance

Overrides Definition::setFactory

File

vendor/symfony/dependency-injection/DefinitionDecorator.php, line 72

Class

DefinitionDecorator
This definition decorates another definition.

Namespace

Symfony\Component\DependencyInjection

Code

public function setFactory($callable) {
  $this->changes['factory'] = true;
  return parent::setFactory($callable);
}