本文整理匯總了PHP中CController::getUniqueId方法的典型用法代碼示例。如果您正苦於以下問題:PHP CController::getUniqueId方法的具體用法?PHP CController::getUniqueId怎麽用?PHP CController::getUniqueId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CController
的用法示例。
在下文中一共展示了CController::getUniqueId方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getViewFile
/**
* Finds the view file for the specified controller's view.
* @param CController $controller the controller
* @param string $viewName the view name
* @return string the view file path. False if the file does not exist.
*/
public function getViewFile($controller, $viewName)
{
$moduleViewPath = $this->getViewPath();
if (($module = $controller->getModule()) !== null) {
$moduleViewPath .= '/' . $module->getId();
}
return $controller->resolveViewFile($viewName, $this->getViewPath() . '/' . $controller->getUniqueId(), $this->getViewPath(), $moduleViewPath);
}
示例2: isControllerMatched
/**
* @param CController $controller the controller
* @return boolean whether the rule applies to the controller
*/
protected function isControllerMatched($controller)
{
return empty($this->controllers) || in_array(strtolower($controller->getUniqueId()), $this->controllers);
}