CBaseUrlRule
鍖 | system.web |
---|---|
缁ф壙 | abstract class CBaseUrlRule » CComponent |
瀛愮被 | CUrlRule |
婧愯嚜 | 1.1.8 |
鐗堟湰 | $Id: CUrlManager.php 3515 2011-12-28 12:29:24Z mdomba $ |
婧愮爜 | framework/web/CUrlManager.php |
CBaseUrlRule is the base class for a URL rule class.
Custom URL rule classes should extend from this class and implement two methods: createUrl and parseUrl.
Custom URL rule classes should extend from this class and implement two methods: createUrl and parseUrl.
鍏叡灞炴
灞炴 | 绫诲瀷 | 鎻忚堪 | 瀹氫箟鍦 |
---|---|---|---|
hasHostInfo | boolean | whether this rule will also parse the host info part. | CBaseUrlRule |
鍏叡鏂规硶
鏂规硶 | 鎻忚堪 | 瀹氫箟鍦 |
---|---|---|
__call() | 濡傛灉绫讳腑娌℃湁璋冪殑鏂规硶鍚嶏紝鍒欒皟鐢ㄨ繖涓柟娉曘 | CComponent |
__get() | 杩斿洖涓涓睘鎬у笺佷竴涓簨浠跺鐞嗙▼搴忓垪琛ㄦ垨涓涓涓哄悕绉般 | CComponent |
__isset() | 妫鏌ヤ竴涓睘鎬ф槸鍚︿负null銆 | CComponent |
__set() | 璁剧疆涓涓粍浠剁殑灞炴у笺 | CComponent |
__unset() | 璁剧疆涓涓粍浠剁殑灞炴т负null銆 | CComponent |
asa() | 杩斿洖杩欎釜鍚嶅瓧鐨勮涓哄璞° | CComponent |
attachBehavior() | 闄勫姞涓涓涓哄埌缁勪欢銆 | CComponent |
attachBehaviors() | 闄勫姞涓涓涓哄垪琛ㄥ埌缁勪欢銆 | CComponent |
attachEventHandler() | 涓轰簨浠堕檮鍔犱竴涓簨浠跺鐞嗙▼搴忋 | CComponent |
canGetProperty() | 纭畾灞炴ф槸鍚﹀彲璇汇 | CComponent |
canSetProperty() | 纭畾灞炴ф槸鍚﹀彲鍐欍 | CComponent |
createUrl() | Creates a URL based on this rule. | CBaseUrlRule |
detachBehavior() | 浠庣粍浠朵腑鍒嗙涓涓涓恒 | CComponent |
detachBehaviors() | 浠庣粍浠朵腑鍒嗙鎵鏈夎涓恒 | CComponent |
detachEventHandler() | 鍒嗙涓涓瓨鍦ㄧ殑浜嬩欢澶勭悊绋嬪簭銆 | CComponent |
disableBehavior() | 绂佺敤涓涓檮鍔犺涓恒 | CComponent |
disableBehaviors() | 绂佺敤缁勪欢闄勫姞鐨勬墍鏈夎涓恒 | CComponent |
enableBehavior() | 鍚敤涓涓檮鍔犺涓恒 | CComponent |
enableBehaviors() | 鍚敤缁勪欢闄勫姞鐨勬墍鏈夎涓恒 | CComponent |
evaluateExpression() | 璁$畻涓涓狿HP琛ㄨ揪寮忥紝鎴栨牴鎹粍浠朵笂涓嬫枃鎵ц鍥炶皟銆 | CComponent |
getEventHandlers() | 杩斿洖涓涓簨浠剁殑闄勫姞澶勭悊绋嬪簭鍒楄〃銆 | CComponent |
hasEvent() | 纭畾涓涓簨浠舵槸鍚﹀畾涔夈 | CComponent |
hasEventHandler() | 妫鏌ヤ簨浠舵槸鍚︽湁闄勫姞鐨勫鐞嗙▼搴忋 | CComponent |
hasProperty() | 纭畾灞炴ф槸鍚﹁瀹氫箟銆 | CComponent |
parseUrl() | Parses a URL based on this rule. | CBaseUrlRule |
raiseEvent() | 鍙戣捣涓涓簨浠躲 | CComponent |
灞炴ц缁
hasHostInfo
灞炴
public boolean $hasHostInfo;
whether this rule will also parse the host info part. Defaults to false.
鏂规硶璇︾粏
createUrl()
鏂规硶
abstract public mixed createUrl(CUrlManager $manager, string $route, array $params, string $ampersand)
| ||
$manager | CUrlManager | the manager |
$route | string | the route |
$params | array | list of parameters (name=>value) associated with the route |
$ampersand | string | the token separating name-value pairs in the URL. |
{return} | mixed | the constructed URL. False if this rule does not apply. |
婧愮爜锛 framework/web/CUrlManager.php#538 (鏄剧ず)
abstract public function createUrl($manager,$route,$params,$ampersand);
Creates a URL based on this rule.
parseUrl()
鏂规硶
abstract public mixed parseUrl(CUrlManager $manager, CHttpRequest $request, string $pathInfo, string $rawPathInfo)
| ||
$manager | CUrlManager | the URL manager |
$request | CHttpRequest | the request object |
$pathInfo | string | path info part of the URL (URL suffix is already removed based on CUrlManager::urlSuffix) |
$rawPathInfo | string | path info that contains the potential URL suffix |
{return} | mixed | the route that consists of the controller ID and action ID. False if this rule does not apply. |
婧愮爜锛 framework/web/CUrlManager.php#547 (鏄剧ず)
abstract public function parseUrl($manager,$request,$pathInfo,$rawPathInfo);
Parses a URL based on this rule.