server/ThinkPHP/Library/ThinkDispatcher.class.php

Classes

Dispatcher ThinkPHP内置的Dispatcher类 完成URL解析、路由和调度

Constants

APP_DOMAIN

APP_DOMAIN = $_SERVER['HTTP_HOST']

SUB_DOMAIN

SUB_DOMAIN = $subDomain

BIND_MODULE

BIND_MODULE = array_shift($array)

BIND_CONTROLLER

BIND_CONTROLLER = $controller

MODULE_PATHINFO_DEPR

MODULE_PATHINFO_DEPR = $depr

__INFO__

__INFO__ = trim($_SERVER['PATH_INFO'], '/')

__EXT__

__EXT__ = strtolower(pathinfo($_SERVER['PATH_INFO'], PATHINFO_EXTENSION))

__SELF__

__SELF__ = strip_tags($_SERVER[C('URL_REQUEST_URI')])

MODULE_NAME

MODULE_NAME = defined('BIND_MODULE') ? BIND_MODULE : self::getModule($varModule)

MODULE_PATH

MODULE_PATH = APP_PATH . MODULE_NAME . '/'

PHP_FILE

PHP_FILE = _PHP_FILE_

__APP__

__APP__ = strip_tags(PHP_FILE)

__MODULE__

__MODULE__ = defined('BIND_MODULE') || !C('MULTI_MODULE') ? __APP__ : __APP__ . '/' . ($urlCase ? strtolower($moduleName) : $moduleName)

CONTROLLER_PATH

CONTROLLER_PATH = self::getSpace($varAddon, $urlCase)

CONTROLLER_NAME

CONTROLLER_NAME = defined('BIND_CONTROLLER') ? BIND_CONTROLLER : self::getController($varController, $urlCase)

ACTION_NAME

ACTION_NAME = defined('BIND_ACTION') ? BIND_ACTION : self::getAction($varAction, $urlCase)

__CONTROLLER__

__CONTROLLER__ = __MODULE__ . $depr . (defined('BIND_CONTROLLER') ? '' : ($urlCase ? parse_name($controllerName) : $controllerName))

__ACTION__

__ACTION__ = __CONTROLLER__ . $depr . (defined('ACTION_ALIAS') ? ACTION_ALIAS : ACTION_NAME)

CONTROLLER_ALIAS

CONTROLLER_ALIAS = strtolower($controller)

ACTION_ALIAS

ACTION_ALIAS = strtolower($action)

MODULE_ALIAS

MODULE_ALIAS = strtolower($module)