src/CompanionLoader.php
public function get($className, $ctorArgs = [], $useCache = true) {
		if (!$useCache) {
			return $this->instantiate($className, $ctorArgs);
		}

		if (!array_key_exists($className, $this->instances)) {
			$instance = $this->instantiate($className, $ctorArgs);
		  $this->instances[$className] = $instance;
		}
		return $this->instances[$className];
	}
public function get($className, $ctorArgs = [], $useCache = true) {
		if (!$useCache) {
			return $this->instantiate($className, $ctorArgs);
		}

		if (!array_key_exists($className, $this->instances)) {
			$instance = $this->instantiate($className, $ctorArgs);
		  $this->instances[$className] = $instance;
		}
		return $this->instances[$className];
	}
public function get ( $ className , $ ctorArgs = [ ] , $ useCache = true ) { if ( ! $ useCache ) { return $ this -> instantiate ( $ className , $ ctorArgs ) ; } if ( ! array_key_exists ( $ className , $ this -> instances ) ) { $ instance = $ this -> instantiate ( $ className , $ ctorArgs ) ; $ this -> instances [ $ className ] = $ instance ; } return $ this -> instances [ $ className ] ; }
Get the generated class instance for the given lonely class.

@param string $className
The class for which a companion, of they type provided by this loader,
should be provided.
@param array $ctorArgs
Array of arguments to pass to the companion constructor. The given
arguments are not unpacked and are passed as an array. This may change
with PHP 5.6. A single argument could be passed instead of an array.
@param boolean $useCache
Whether or not a retrieve a cached instance if available. If a cached
instance is used then any given constructor args will be ignored.
Get the generated class instance for the given lonely class .