Route.php 551 字节
<?php

namespace Lib;

use Controller\Home;

/**
 * 路由
 * @author:dc
 * @time 2023/2/13 11:22
 * Class Route
 * @package Lib
 */
class Route {

    /**
     * @var array
     */
    private array $url = [];

    public function __construct()
    {

        $this->url = require_once ROOT_PATH.'/route.php';

    }

    /**
     * @param $route
     * @return array
     * @author:dc
     * @time 2023/2/13 11:30
     */
    public function get($route):array{
        $route = trim($route,'/');
        return $this->url[$route]??[];
    }



}