<?php
namespace Modules\Systeme\Rules;

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

// @phpcs:ignore
class TraductionSysteme
{
    /** @var ServerRequestInterFace $request */
    protected ServerRequestInterface $request;
    
    /** @var \PDO $pdo */
    protected \PDO $pdo;
    
    /**
     * @param ServerRequestInterface $request
     * @param \PDO $pdo
     */
    public function __construct(ServerRequestInterface $request, \PDO $pdo)
    {
        $this->request  = $request;
        $this->pdo      = $pdo;
    }
    
    /**
     * @return bool
     */
    public function init(): bool
    {
        if ($_SESSION['Session_Login'] === 'OXAUSER' || $_SESSION['Session_Login'] === 'ADMINCENTRAL' || Roles::GetALL()) {
            return true;
        }

        return false;
    }

    /**
     * @return bool
     */
    // @phpcs:ignore
    public function trad(): bool
    {
        return true;
    }

    /**
     * @return bool
     */
    // @phpcs:ignore
    public function extractionTraduction(): bool
    {
        return true;
    }

    /**
     * @return bool
     */
    // @phpcs:ignore
    public function ajaxExtractionTraduction(): bool
    {
        return true;
    }
}
