src/Container.php
protected function getFactory($class) {
		if (isset($this->factories[$class])) {
			return $this->factories[$class];
		}

		$factory = new $class($this);
		$this->factories[$class] = $factory;
		return $factory;
	}
protected function getFactory($class) {
		if (isset($this->factories[$class])) {
			return $this->factories[$class];
		}

		$factory = new $class($this);
		$this->factories[$class] = $factory;
		return $factory;
	}
protected function getFactory ( $ class ) { if ( isset ( $ this -> factories [ $ class ] ) ) { return $ this -> factories [ $ class ] ; } $ factory = new $ class ( $ this ) ; $ this -> factories [ $ class ] = $ factory ; return $ factory ; }
Construct a factory instance and inject this container to the instance.

@param string $class
@return object
Construct a factory instance and inject this container to the instance .