vendor/sylius/sylius/src/Sylius/Bundle/ChannelBundle/Doctrine/ORM/ChannelRepository.php line 24

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Sylius package.
  4.  *
  5.  * (c) Paweł Jędrzejewski
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace Sylius\Bundle\ChannelBundle\Doctrine\ORM;
  12. use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;
  13. use Sylius\Component\Channel\Model\ChannelInterface;
  14. use Sylius\Component\Channel\Repository\ChannelRepositoryInterface;
  15. class ChannelRepository extends EntityRepository implements ChannelRepositoryInterface
  16. {
  17.     public function findOneByHostname(string $hostname): ?ChannelInterface
  18.     {
  19.         return $this->findOneBy(['hostname' => $hostname]);
  20.     }
  21.     public function findOneByCode(string $code): ?ChannelInterface
  22.     {
  23.         return $this->findOneBy(['code' => $code]);
  24.     }
  25.     public function findByName(string $name): iterable
  26.     {
  27.         return $this->findBy(['name' => $name]);
  28.     }
  29. }