public function &mustGetById($type, $id, $use_cache = true)
    {
        $result = $this->getById($type, $id, $use_cache);

        if (empty($result)) {
            throw new ObjectNotFoundException($type, $id);
        }

        return $result;
    }
public function &mustGetById($type, $id, $use_cache = true)
    {
        $result = $this->getById($type, $id, $use_cache);

        if (empty($result)) {
            throw new ObjectNotFoundException($type, $id);
        }

        return $result;
    }
public function & mustGetById ( $ type , $ id , $ use_cache = true ) { $ result = $ this -> getById ( $ type , $ id , $ use_cache ) ; if ( empty ( $ result ) ) { throw new ObjectNotFoundException ( $ type , $ id ) ; } return $ result ; }
Return object from object pool by the given type and ID; if object is not found, raise an exception.

@param  string                   $type
@param  int                      $id
@param  bool                     $use_cache
@return object
@throws ObjectNotFoundException
@throws InvalidArgumentException
Return object from object pool by the given type and ID ; if object is not found raise an exception .