Newscoop\Service\Implementation\AEntityBaseServiceDoctrine::getById PHP Method

getById() public method

* ---------------------------------------------------------------
public getById ( $id )
    function getById($id)
    {
        Validation::notEmpty($id, 'id');
        $entity = $this->findById($id);
        if ($entity === NULL) {
            throw new \Exception("Cannot locate '{$this->entityClassName}' for id '{$id}'.");
        }
        return $entity;
    }