<?php

namespace App\Controladores;

use Core\Controller;
use App\Modelos\Zonas;
use Core\Librerias\Http;

final class ZonasControlador extends Controller
{
    private $zonas;

    public function __construct()
    {
        $this->zonas = new Zonas();
    }

    public function obtenerZonas()
    {
        if ('GET' === $_SERVER['REQUEST_METHOD'] && isAjax()) {
            return Http::json_response($this->zonas->todos());
        }
    }
}
