public function offsetGet($class)
	{
		if (!isset($this->factories[$class]) && !isset($this->instances[$class])) {
			throw new \InvalidArgumentException("$class has not been defined");
		}

		if (isset($this->instances[$class])) {
			return $this->instances[$class];
		}

		array_push($this->resolving, $class);
		$object = $this->invoke($this->factories[$class]);
		array_pop($this->resolving);

		return $object;
	}
public function offsetGet($class)
	{
		if (!isset($this->factories[$class]) && !isset($this->instances[$class])) {
			throw new \InvalidArgumentException("$class has not been defined");
		}

		if (isset($this->instances[$class])) {
			return $this->instances[$class];
		}

		array_push($this->resolving, $class);
		$object = $this->invoke($this->factories[$class]);
		array_pop($this->resolving);

		return $object;
	}
public function offsetGet ( $ class ) { if ( ! isset ( $ this -> factories [ $ class ] ) && ! isset ( $ this -> instances [ $ class ] ) ) { throw new \ InvalidArgumentException ( "$class has not been defined" ) ; } if ( isset ( $ this -> instances [ $ class ] ) ) { return $ this -> instances [ $ class ] ; } array_push ( $ this -> resolving , $ class ) ; $ object = $ this -> invoke ( $ this -> factories [ $ class ] ) ; array_pop ( $ this -> resolving ) ; return $ object ; }
get a dependency for the supplied class

@param $type string
The type to get

@return mixed
The dependency/type value
get a dependency for the supplied class