I'm learning the mvc pattern and today I finished my first mvc routing class.Hope you can give me some tipps and improvements.Router.php<?phpnamespace System\Libraries;class Router{    /**     * Store the given parameters     *     * @var array     */    private $_param = [];    /**     * Default action     *     * @var bool     */    private $_action = 'index';    /**     * Store the given request     *     * @var array     */    private $_request = [];    /**     * Default controller     *     * @var bool     */    private $_controller = 'index';    /**     * Constructor     */    public function __construct()    {        $this->splitUrl();        $this->setRoute();    }    /**     * Split the url     *     * @return void     */    public function splitUrl()    {        if (isset($_GET['url']) && !empty($_GET['url'])) {            $this->_request = trim(filter_var(strtolower($_GET['url']), FILTER_SANITIZE_URL));            $this->_request = explode('/', rtrim($this->_request, '/'));        } else {            $this->_request = null;        }    }    /**     * Check the request and load the controller     *     * @return void     */    public function setRoute()    {        if (isset($this->_request[0])) {            if (file_exists(ROOT . '/app/controllers/' . $this->_request[0] . '.php')) {                $this->_controller = $this->_request[0];            } else {                $this->_controller = 'error';            }        }        $this->_controller = 'App\Controllers\\' . ucfirst($this->_controller);        $this->_controller = new $this->_controller;        if (isset($this->_request[1])) {            if (method_exists($this->_controller, $this->_request[1] . 'Action')) {                $this->_action = $this->_request[1];            } else {                $this->_action = 'error';            }        }        unset($this->_request[0], $this->_request[1]);        if (isset($this->_request[2])) {            $this->_param = array_values($this->_request);        }        call_user_func_array([$this->_controller, $this->_action . 'Action'], $this->_param);    }    /**     * Destory the variables     *     * @return void     */    public function __destruct()    {        $this->_param      = null;        $this->_model      = null;        $this->_action     = null;        $this->_request    = null;        $this->_controller = null;    }}?>
First MVC Router
php;mvc