Documentation

Core_Router
in package

Routers

// Add robots.txt route Core_Router::add('robots.txt', '/robots.txt') ->controller('Core_Command_Controller_Robots');

// Add news route Core_Router::add('news', '/news/({path})(page-{page}/)(tag/{tag}/)') ->controller('Core_Command_Controller_News');

// Resolve route for URI $uri Core_Router::factory(Core::$url['path']) ->execute() ->compress() ->sendHeaders() ->showBody();
Tags
subpackage

Core\Router

version
7.x
author

Hostmake LLC

copyright

© 2005-2024 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

Properties

$_routes  : array<string|int, mixed>
List of routes

Methods

add()  : Core_Router_Route
Add route Core_Router_Route with name $routeName for URI with routing rules $uri
factory()  : Core_Router_Route
Resolve route for URI $uri

Properties

$_routes

List of routes

protected static array<string|int, mixed> $_routes = array()

Methods

add()

Add route Core_Router_Route with name $routeName for URI with routing rules $uri

public static add( $routeName[,  $uri = NULL ][, array<string|int, mixed> $expressions = array() ]) : Core_Router_Route
Parameters
$routeName :

Name of route

$uri : = NULL

URI pattern

$expressions : array<string|int, mixed> = array()

list of expressions

Return values
Core_Router_Route

        
On this page

Search results