<?php

namespace App\Service\Frontend;

use Doctrine\ORM\EntityManagerInterface;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;

class ServicePanier
{
    
    /**
     * @var RequestStack $session
     */
    private $session;
    

    /**
     * @param RequestStack $requestStack
     * @return $this
     */
    public function __construct(
        private RequestStack $requestStack,
    ){
        $this->session = $requestStack->getSession();
    }

    public function clear($user)
    {
        $id = $user->getId();

        $this->session->set("Panier-$id", []);

        return true;
    }








}

