public function find($class, $id)
    {
        if (!isset($id)) {
            return;
        }

        if (null === $class) {
            return $this->dm->find(null, $id);
        }

        return $this->dm->getRepository($class)->find($id);
    }
public function find($class, $id)
    {
        if (!isset($id)) {
            return;
        }

        if (null === $class) {
            return $this->dm->find(null, $id);
        }

        return $this->dm->getRepository($class)->find($id);
    }
public function find ( $ class , $ id ) { if ( ! isset ( $ id ) ) { return ; } if ( null === $ class ) { return $ this -> dm -> find ( null , $ id ) ; } return $ this -> dm -> getRepository ( $ class ) -> find ( $ id ) ; }
Find one object from the given class repository.

{@inheritdoc}
Find one object from the given class repository .