public function findPageBy($repository, $conditions)
    {
        $ret = $this->em->getRepository($repository)->findOneBy($conditions);
        if (!$ret) {
            throw new NotFoundHttpException;
        }
        return $ret;
    }
public function findPageBy($repository, $conditions)
    {
        $ret = $this->em->getRepository($repository)->findOneBy($conditions);
        if (!$ret) {
            throw new NotFoundHttpException;
        }
        return $ret;
    }
public function findPageBy ( $ repository , $ conditions ) { $ ret = $ this -> em -> getRepository ( $ repository ) -> findOneBy ( $ conditions ) ; if ( ! $ ret ) { throw new NotFoundHttpException ; } return $ ret ; }
Finds a page in the specified repository by the specified conditions.

@param string $repository
@param array $conditions
@return null|object

@throws NotFoundHttpException
Finds a page in the specified repository by the specified conditions .