<?php

namespace Modules\Panier\Rules;

use Helpers\Outil\Roles;
use Psr\Http\Message\ServerRequestInterface;

class Panier
{
    protected ServerRequestInterface $request;
    protected \PDO $pdo;
    
    /**
     * __construct
     *
     * @param  ServerRequestInterface $request
     * @return void
     */
    public function __construct(ServerRequestInterface  $request, \PDO $pdo)
    {
        $this->request  = $request;
        $this->pdo      = $pdo;
    }
    
    /**
     * init
     *
     * @return bool
     */
    public function init() : bool
    {
        if ($_SESSION['IS_STE_VALIDE'] || $_SESSION['DA_CreatModif'] || Roles::GetALL()) {
            return true;
        }
        return false;
    }
}
