PHPFusion\Rewrite\Router::checkAlias PHP Метод

checkAlias() приватный Метод

This function will check if there is any matching Alias for the URI or not.
private checkAlias ( )
    private function checkAlias()
    {
        // Check if there is any Alias matching the current URI
        $query = "SELECT * FROM " . DB_PERMALINK_ALIAS . " WHERE alias_url='" . $this->requesturi . "' LIMIT 1";
        $result = dbquery($query);
        $this->queries[] = $query;
        if (dbrows($result)) {
            $aliasdata = dbarray($result);
            // If Yes, then Exploded the corresponding php_url and render the page
            if ($aliasdata['alias_php_url'] != "") {
                $alias_url = $this->getAliasURL($aliasdata['alias_url'], $aliasdata['alias_php_url'], $aliasdata['alias_type']);
                $url_info = $this->explodeURL($alias_url, "&");
                // File Path (Example: news.php)
                $this->pathtofile = $url_info[0];
                if (isset($url_info[1])) {
                    foreach ($url_info[1] as $paramkey => $paramval) {
                        $this->get_parameters[$paramkey] = $paramval;
                        // $this->get_parameters['thread_id'] = 1
                    }
                }
                // Call the function to set server variables
                $this->setVariables();
                $this->setWarning(7, $this->requesturi);
                // Alias Found
                return TRUE;
            }
        } else {
            $this->setWarning(1, $this->requesturi);
            // Alias not found
            return FALSE;
        }
    }