<?php

namespace Modules\GlobalApplication\Repository;

class Centre
{
    
    private $pdo;
    
    public function __construct(\PDO $pdo)
    {
        $this->pdo = $pdo;
    }
 
    /**
     * ListeZoneGeoCentre
     * @param string $centre
     * @return array<mixed>
     */
    // phpcs:ignore
    public function ListeZoneGeoCentre(string $centre) : ?array
    {
        $req = "select * from DGEOCTRE with (nolock) WHERE CODE_CTR = :centre";
        
        $arrayReq = [':centre' => $centre];
        
        $articles = $this->pdo->prepare($req);
        $articles->execute($arrayReq);
        
        return  $articles->fetchAll($this->pdo::FETCH_ASSOC);
    }
}
