本文整理汇总了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;
}