public function getById($id = null)
    {
        if ($id === null) {
            throw new ItemNotSelectedException;
        }
        $entity = $this->repository->findById($id);
        if (!$entity) {
            throw new NonexistingItemException;
        }
        return $entity;
    }
public function getById($id = null)
    {
        if ($id === null) {
            throw new ItemNotSelectedException;
        }
        $entity = $this->repository->findById($id);
        if (!$entity) {
            throw new NonexistingItemException;
        }
        return $entity;
    }
public function getById ( $ id = null ) { if ( $ id === null ) { throw new ItemNotSelectedException ; } $ entity = $ this -> repository -> findById ( $ id ) ; if ( ! $ entity ) { throw new NonexistingItemException ; } return $ entity ; }
Method which finds one item in the repository
@param type $id
@return type entity
@throws ItemNotSelectedException
Method which finds one item in the repository