mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-17 12:50:08 -07:00
28 lines
556 B
PHP
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();
|
|
}
|
|
}
|