本文整理匯總了PHP中CSession::Set方法的典型用法代碼示例。如果您正苦於以下問題:PHP CSession::Set方法的具體用法?PHP CSession::Set怎麽用?PHP CSession::Set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CSession
的用法示例。
在下文中一共展示了CSession::Set方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: DoPost
public function DoPost()
{
if (isset($_POST['next_btn'])) {
if (5 > strlen(trim(CPost::Get('txtPassword1', '')))) {
CSession::Set('wm_install_pass_error', 'Minimum password length is 5 characters.');
} else {
if (CPost::Get('txtPassword1', '') !== CPost::Get('txtPassword2', '')) {
CSession::Set('wm_install_pass_error', 'The password and its confirmation don\'t match.');
} else {
$this->oSettings->SetConf('Common/AdminPassword', md5(CPost::Get('txtPassword1', '')));
return $this->oSettings->SaveToXml();
}
}
}
return false;
}
示例2: SetSessionValue
/**
* @param string $sKey
* @param mixed $mValue
*/
public function SetSessionValue($sKey, $mValue)
{
$sUniqueKey = $this->getSessionUniqueKey();
$aValues = CSession::get($sUniqueKey, array());
if (!is_array($aValues)) {
$aValues = array();
}
$aValues[$sKey] = $mValue;
CSession::Set($sUniqueKey, $aValues);
}
示例3: ShowError
/**
* @param string $sDesc
*/
public function ShowError($sDesc)
{
CSession::Set(AP_SESS_ERROR, $sDesc);
}
示例4: UpdateCalUser
/**
* @param CCalUser $oCalUser
* @return bool
*/
public function UpdateCalUser(CCalUser $oCalUser)
{
CSession::Set(CApiUsersNodbStorage::SESS_CAL_USERS_STORAGE, $oCalUser);
return true;
}
示例5: GetCurrentMode
/**
* @return string
*/
public function GetCurrentMode()
{
if (!isset($this->aMenu[$this->sMode])) {
$this->sMode = $this->aMenuDefMode;
}
if (empty($this->sMode)) {
$sScreenName = $this->GetScreenName();
foreach (array_keys($this->aMenu) as $sKeyName) {
$this->sMode = $sKeyName;
CSession::Set($sScreenName . self::SESS_MODE, $this->sMode);
break;
}
}
return $this->sMode;
}
示例6: setTenantAccessId
/**
* @param int $iTenantId
*/
protected function setTenantAccessId($iTenantId)
{
CSession::Set(AP_SESS_AUTH_TENANT_ID, $iTenantId);
$this->oAdminPanel->SetAuthTenantId($iTenantId);
// if (0 < $iTenantId)
// {
// $oTenant = $this->oAdminPanel->GetTenantAdminObject();
// if ($oTenant)
// {
// $this->oAdminPanel->SetTenantTabsInfo($oTenant);
// }
// }
}
示例7: GetSelectedItemKey
/**
* @return string
*/
public function GetSelectedItemKey()
{
$aTemp = array();
foreach (array_keys($this->aList) as $mIndex) {
if ($mIndex == $this->sSelectedItem) {
return $this->sSelectedItem;
}
$aTemp[] = $mIndex;
}
$sScreenName = $this->oTableScreen->GetScreenName();
CSession::Set($sScreenName . ap_Table_Screen::SESS_FILTER, 0 < count($aTemp) ? $aTemp[0] : '');
$this->sSelectedItem = CSession::get($sScreenName . ap_Table_Screen::SESS_FILTER, '');
return $this->sSelectedItem;
}