1
0
mirror of https://github.com/ToxicCrack/PrintABrick.git synced 2025-05-17 12:50:08 -07:00
PrintABrick/src/AppBundle/Service/ColorService.php
2017-06-08 20:29:09 +02:00

28 lines
556 B
PHP

<?php
namespace AppBundle\Service;
use AppBundle\Entity\Color;
use AppBundle\Repository\ColorRepository;
use Doctrine\ORM\EntityManagerInterface;
class ColorService
{
/** @var ColorRepository */
private $colorRepository;
/**
* ColorService constructor.
* @param EntityManagerInterface $em
*/
public function __construct(EntityManagerInterface $em)
{
$this->colorRepository = $em->getRepository(Color::class);
}
public function getAll()
{
return $this->colorRepository->findAll();
}
}