<?php

namespace Modules\ProjetAchat\Rules;

use Psr\Http\Message\ServerRequestInterface;

class Task
{
    protected ServerRequestInterface $request;
    protected \PDO $pdo;
    protected Main $main;

    public function __construct(ServerRequestInterface $request, \PDO $pdo)
    {
        $this->request    = $request;
        $this->pdo        = $pdo;
        $this->main       = new Main($this->request, $this->pdo);
    }

    public function create(): bool
    {
        return $this->main->creatEditAccess();
    }

    public function edit(): bool
    {
        return $this->main->creatEditAccess();
    }

    public function delete(): bool
    {
        return $this->main->creatEditAccess();
    }


    /**
     * @return bool
     */
    public function details(): bool
    {
        return true;
    }

    /**
     * @return bool
     */
    public function findEndDate(): bool
    {
        return true;
    }

    /**
     * @return bool
     */
    public function ajaxReorderTask(): bool
    {
        return true;
    }
}
