classes/Container.php
public function getFactory($class, array $params = array())
	{
		if (!isset($this->factories[$class]) && $this->autowire) {
			$this->factories[$class] = Definition::getDefaultForClass($class);
		}

		$factory = $this->factories[$class];

		// if $params is defined, we need to either make a copy of the existing
		// Factory or make the Definition create a new factory with the params
		if ($params) {
			$factory = $factory->getFactory($params);
		}

		return $factory;
	}
public function getFactory($class, array $params = array())
	{
		if (!isset($this->factories[$class]) && $this->autowire) {
			$this->factories[$class] = Definition::getDefaultForClass($class);
		}

		$factory = $this->factories[$class];

		// if $params is defined, we need to either make a copy of the existing
		// Factory or make the Definition create a new factory with the params
		if ($params) {
			$factory = $factory->getFactory($params);
		}

		return $factory;
	}
public function getFactory ( $ class , array $ params = array ( ) ) { if ( ! isset ( $ this -> factories [ $ class ] ) && $ this -> autowire ) { $ this -> factories [ $ class ] = Definition :: getDefaultForClass ( $ class ) ; } $ factory = $ this -> factories [ $ class ] ; // if $params is defined, we need to either make a copy of the existing // Factory or make the Definition create a new factory with the params if ( $ params ) { $ factory = $ factory -> getFactory ( $ params ) ; } return $ factory ; }
Get the existing factory for a class. If a factory is not already defined
a default one will be created via reflection.

@param  string $class  Name of the class
@param  array  $params Optional

@return FactoryInterface
Get the existing factory for a class . If a factory is not already defined a default one will be created via reflection .