src/Titon/Common/Container.php
public function &get($key) {
        if ($this->has($key)) {
            $object = $this->_registered[$key];

            if ($object instanceof Closure) {
                $object = $this->set(call_user_func($object), $key);
            }

            return $object;
        }

        throw new MissingObjectException(sprintf('Object %s does not exist in the container', $key));
    }
public function &get($key) {
        if ($this->has($key)) {
            $object = $this->_registered[$key];

            if ($object instanceof Closure) {
                $object = $this->set(call_user_func($object), $key);
            }

            return $object;
        }

        throw new MissingObjectException(sprintf('Object %s does not exist in the container', $key));
    }
public function & get ( $ key ) { if ( $ this -> has ( $ key ) ) { $ object = $ this -> _registered [ $ key ] ; if ( $ object instanceof Closure ) { $ object = $ this -> set ( call_user_func ( $ object ) , $ key ) ; } return $ object ; } throw new MissingObjectException ( sprintf ( 'Object %s does not exist in the container' , $ key ) ) ; }
Return the object assigned to the given key.

@param string $key
@return object
@throws \Titon\Common\Exception\MissingObjectException
Return the object assigned to the given key .