src/Eccube/Repository/BaseInfoRepository.php line 44

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.ec-cube.co.jp/
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace Eccube\Repository;
  13. use Eccube\Entity\BaseInfo;
  14. use Symfony\Bridge\Doctrine\RegistryInterface;
  15. /**
  16.  * BaseInfoRepository
  17.  *
  18.  * This class was generated by the Doctrine ORM. Add your own custom
  19.  * repository methods below.
  20.  */
  21. class BaseInfoRepository extends AbstractRepository
  22. {
  23.     /**
  24.      * BaseInfoRepository constructor.
  25.      *
  26.      * @param RegistryInterface $registry
  27.      */
  28.     public function __construct(RegistryInterface $registry)
  29.     {
  30.         parent::__construct($registryBaseInfo::class);
  31.     }
  32.     /**
  33.      * @param int $id
  34.      *
  35.      * @return BaseInfo
  36.      */
  37.     public function get($id 1)
  38.     {
  39.         $BaseInfo $this->find($id);
  40.         if (null === $BaseInfo) {
  41.             throw new \Exception('BaseInfo not found. id = '.$id);
  42.         }
  43.         return $this->find($id);
  44.     }
  45. }