Documentation

IRoute extends IRouteBase
in package

路由

Table of Contents

Properties

$app  : mixed
$base_url  : mixed
$class  : mixed
$controller_name  : mixed
控制器名称 strtolower ucfirst
$current_class  : mixed
$current_domain  : mixed
$err  : mixed
$host  : mixed
$index  : mixed
$match  : mixed
$obj  : mixed
$pre  : mixed
$r  : mixed
默认路由模块namespace为module
$router  : mixed
$status  : mixed
$_url  : mixed
$_value  : mixed
$method  : mixed

Methods

__construct()  : mixed
构造函数
_uri()  : mixed
内部函数
all()  : mixed
get/post request
delete()  : mixed
put request
do()  : mixed
执行路由
do_object()  : mixed
处理对象
domain()  : call_user_func
domain路由
get()  : mixed
get request
get_action()  : mixed
取得控制器的 model id action [action] => login [module] => admin [package] => core [controller] => site
get_class()  : mixed
建议内部使用
host()  : string
host自动加http://或https://
init()  : mixed
初始化
post()  : mixed
post request
put()  : mixed
put request
run()  : mixed
执行路由
server_name()  : mixed
server_name
uri()  : mixed
uri
url()  : mixed
* 生成URL
array_combine()  : mixed
内部函数 ,对array_combine优化
create_url()  : mixed
生成URL
exec()  : mixed
内部函数, 执行解析URL 到对应namespace 或 closure
load_route()  : mixed
内部函数,支持框架内部框架
output()  : mixed
输出
set_request_value()  : mixed
内部函数 ,根据请求设置值
set_router()  : mixed
对GET POST all 设置router

Properties

$controller_name

控制器名称 strtolower ucfirst

public static mixed $controller_name = 'strtolower'

$current_class

public static mixed $current_class

$current_domain

public static mixed $current_domain

$match

public mixed $match = '/<(\\w+):([^>]+)?>/'

$r

默认路由模块namespace为module

public static mixed $r = ['core', 'app', 'modules']

Methods

__construct()

构造函数

public __construct() : mixed

_uri()

内部函数

public static _uri() : mixed

all()

get/post request

public static all(mixed $url, mixed $do[, mixed $name = null ]) : mixed
Parameters
$url : mixed
$do : mixed
$name : mixed = null

delete()

put request

public static delete(mixed $url, mixed $do[, mixed $name = null ]) : mixed
Parameters
$url : mixed
$do : mixed
$name : mixed = null

do()

执行路由

public static do([mixed $ok = null ][, mixed $not_find = null ]) : mixed
Parameters
$ok : mixed = null
$not_find : mixed = null

do_object()

处理对象

public static do_object(mixed $res) : mixed
Parameters
$res : mixed

domain()

domain路由

public static domain(string $domain, string $fun) : call_user_func
Parameters
$domain : string
$fun : string
Return values
call_user_func

get()

get request

public static get(mixed $url, mixed $do[, mixed $name = null ]) : mixed
Parameters
$url : mixed
$do : mixed
$name : mixed = null

get_action()

取得控制器的 model id action [action] => login [module] => admin [package] => core [controller] => site

public static get_action() : mixed

get_class()

建议内部使用

public static get_class() : mixed

host()

host自动加http://或https://

public static host() : string
Return values
string

post()

post request

public static post(mixed $url, mixed $do[, mixed $name = null ]) : mixed
Parameters
$url : mixed
$do : mixed
$name : mixed = null

put()

put request

public static put(mixed $url, mixed $do[, mixed $name = null ]) : mixed
Parameters
$url : mixed
$do : mixed
$name : mixed = null

server_name()

server_name

public static server_name() : mixed

url()

* 生成URL

public static url(mixed $url[, mixed $par = [] ]) : mixed
Parameters
$url : mixed
$par : mixed = []

array_combine()

内部函数 ,对array_combine优化

protected array_combine([mixed $a = [] ][, mixed $b = [] ]) : mixed
Parameters
$a : mixed = []
$b : mixed = []

create_url()

生成URL

protected create_url(mixed $url[, mixed $par = [] ]) : mixed
Parameters
$url : mixed
$par : mixed = []

exec()

内部函数, 执行解析URL 到对应namespace 或 closure

protected exec() : mixed

load_route()

内部函数,支持框架内部框架

protected load_route(mixed $class, mixed $ac, mixed $data) : mixed
Parameters
$class : mixed
$ac : mixed
$data : mixed

output()

输出

protected output(mixed $res) : mixed
Parameters
$res : mixed

set_request_value()

内部函数 ,根据请求设置值

protected set_request_value(mixed $data) : mixed
Parameters
$data : mixed

set_router()

对GET POST all 设置router

protected set_router(mixed $url, mixed $do[, mixed $method = 'GET' ][, mixed $name = null ]) : mixed
Parameters
$url : mixed
$do : mixed
$method : mixed = 'GET'
$name : mixed = null
✖ Error 404 while fetching file: ✖ Error 404 while fetching file: 
On this page

Search results