Eccube\Repository\BaseInfoRepository::get PHP Method

get() public method

get
public get ( mixed $id = 1 ) : object | null
$id mixed The identifier.
return object | null The entity instance or NULL if the entity can not be found.
    public function get($id = 1)
    {
        $options = $this->app['config']['doctrine_cache'];
        $lifetime = $options['result_cache']['lifetime'];
        $qb = $this->createQueryBuilder('b')->where('b.id = :id')->setParameter('id', $id);
        return $qb->getQuery()->useResultCache(true, $lifetime)->getSingleResult();
    }
BaseInfoRepository