public function &get($id)
    {
        if (isset($this->instances[$id])) {
            return $this->instances[$id];
        }

        $result = $this->resolve($id);

        if (array_key_exists($id, $this->instances)) {
            $this->instances[$id] = & $result;
        }

        return $result;
    }
public function &get($id)
    {
        if (isset($this->instances[$id])) {
            return $this->instances[$id];
        }

        $result = $this->resolve($id);

        if (array_key_exists($id, $this->instances)) {
            $this->instances[$id] = & $result;
        }

        return $result;
    }
public function & get ( $ id ) { if ( isset ( $ this -> instances [ $ id ] ) ) { return $ this -> instances [ $ id ] ; } $ result = $ this -> resolve ( $ id ) ; if ( array_key_exists ( $ id , $ this -> instances ) ) { $ this -> instances [ $ id ] = & $ result ; } return $ result ; }
Returns component instance or value

@param string $id

@return mixed
Returns component instance or value