Application::splitUrl PHP Method

splitUrl() private method

Get and split the URL
private splitUrl ( )
    private function splitUrl()
    {
        if (Request::get('url')) {
            // split URL
            $url = trim(Request::get('url'), '/');
            $url = filter_var($url, FILTER_SANITIZE_URL);
            $url = explode('/', $url);
            // put URL parts into according properties
            $this->controller_name = isset($url[0]) ? $url[0] : null;
            $this->action_name = isset($url[1]) ? $url[1] : null;
            // remove controller name and action name from the split URL
            unset($url[0], $url[1]);
            // rebase array keys and store the URL parameters
            $this->parameters = array_values($url);
        }
    }