-
-
Save kamil161g/6b68207d30406e7fb8cc2cfba82d8f71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Service; | |
use App\Entity\Orders; | |
use Doctrine\ORM\EntityManagerInterface; | |
class OrderService | |
{ | |
/** | |
* @var EntityManagerInterface | |
*/ | |
private $entityManager; | |
public function __construct(EntityManagerInterface $entityManager) | |
{ | |
$this->entityManager = $entityManager; | |
} | |
/** | |
* @param Orders $orders | |
* @throws \Doctrine\ORM\ORMException | |
* @throws \Doctrine\ORM\OptimisticLockException | |
*/ | |
public function insertFoodToOrder(Orders $orders) | |
{ | |
return $this->entityManager->getRepository(Orders::class)->insertOrder($orders); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment