本文整理匯總了PHP中unknown_type::run方法的典型用法代碼示例。如果您正苦於以下問題:PHP unknown_type::run方法的具體用法?PHP unknown_type::run怎麽用?PHP unknown_type::run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類unknown_type
的用法示例。
在下文中一共展示了unknown_type::run方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: filterCheckAdmin
/**
*
* 過濾器
* @param unknown_type $filterChain
*/
public function filterCheckAdmin($filterChain)
{
//未登錄,跳轉
if (!($uid = $this->isAdmin())) {
$this->redirect(Yii::app()->baseUrl . "/");
}
//獲取用戶詳細資料
$adminModel = new AdminModel();
$this->_userInfo = $adminModel->getInfoByUid($uid);
$this->username = $this->_userInfo['username'];
$this->hospital = $this->_userInfo['hospital'];
$this->role = $this->_userInfo['role'];
//賬號錯誤
if (!$this->_userInfo) {
$this->_output("302", 'access deny', 'text');
}
$roleModel = new RoleModel();
$role = $roleModel->getInfoByCode($this->_userInfo['role']);
if ($role && $role['permission']) {
$permission = explode(',', $role['permission']);
//生成菜單
$menuModel = new MenuModel();
$this->menus = $menuModel->getInfoByGroup($permission);
foreach ($this->menus as $key => $value) {
$this->menuGroup[$value['group']] = $value['group'];
}
} else {
header("HTTP/1.1 401");
exit;
}
$filterChain->run();
}
示例2: attemptQuery
/**
* Runs a SQL query using the install resource provided and
* remembers any errors that occur.
*
* @param unknown_type $installer
* @param string $sql
* @return Aschroder_SMTPPro_Helper_Mysql4_Install
*/
public function attemptQuery(&$installer, $sql)
{
try {
$installer->run($sql);
} catch (Exception $ex) {
$this->addInstallProblem($ex);
}
return $this;
}