當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CakeSession::valid方法代碼示例

本文整理匯總了PHP中CakeSession::valid方法的典型用法代碼示例。如果您正苦於以下問題:PHP CakeSession::valid方法的具體用法?PHP CakeSession::valid怎麽用?PHP CakeSession::valid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CakeSession的用法示例。


在下文中一共展示了CakeSession::valid方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: valid

 /**
  * Used to check for a valid session.
  *
  * In your controller: $this->Session->valid();
  *
  * @return boolean true is session is valid, false is session is invalid
  * @access public
  */
 function valid()
 {
     if ($this->__active === true) {
         $this->__start();
         return parent::valid();
     }
     return false;
 }
開發者ID:laiello,項目名稱:myopensources,代碼行數:16,代碼來源:session.php

示例2: valid

 /**
  * Returns true if session is valid.
  *
  * @return bool Success
  */
 public static function valid()
 {
     if (self::start() && self::read('Config')) {
         if (self::_validAgentAndTime() && self::$error === false) {
             self::$valid = true;
         } else {
             self::$valid = false;
             self::_setError(1, 'Session Highjacking Attempted !!!');
         }
     }
     return self::$valid;
 }
開發者ID:kyme-online,項目名稱:Ramesh-Photography,代碼行數:17,代碼來源:CakeSession.php

示例3: valid

 /**
  * Used to check is a session is valid in a view
  *
  * @return bool
  * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/session.html#SessionHelper::valid
  */
 public function valid()
 {
     return CakeSession::valid();
 }
開發者ID:thanphong,項目名稱:do-an-tot-nghiep-project,代碼行數:10,代碼來源:SessionHelper.php

示例4: valid

 /**
  * Used to check is a session is valid in a view
  *
  * @return boolean
  * @access public
  */
 function valid()
 {
     if ($this->__active === true && $this->__start()) {
         return parent::valid();
     }
 }
開發者ID:laiello,項目名稱:myopensources,代碼行數:12,代碼來源:session.php

示例5: _checkValid

 /**
  * Helper method to create a new session.
  *
  * @return void
  */
 protected static function _checkValid()
 {
     if (!self::started() && !self::start()) {
         self::$valid = false;
         return false;
     }
     if ($config = self::read('Config')) {
         $sessionConfig = Configure::read('Session');
         if (self::_validAgentAndTime()) {
             self::write('Config.time', self::$sessionTime);
             if (isset($sessionConfig['autoRegenerate']) && $sessionConfig['autoRegenerate'] === true) {
                 $check = $config['countdown'];
                 $check -= 1;
                 self::write('Config.countdown', $check);
                 if ($check < 1) {
                     self::renew();
                     self::write('Config.countdown', self::$requestCountdown);
                 }
             }
             self::$valid = true;
         } else {
             self::destroy();
             self::$valid = false;
             self::_setError(1, 'Session Highjacking Attempted !!!');
         }
     } else {
         self::write('Config.userAgent', self::$_userAgent);
         self::write('Config.time', self::$sessionTime);
         self::write('Config.countdown', self::$requestCountdown);
         self::$valid = true;
     }
 }
開發者ID:abhinand4858,項目名稱:ProgrammedV,代碼行數:37,代碼來源:CakeSession.php

示例6: valid

 /**
  * Used to check is a session is valid in a view
  *
  * @return boolean
  * @access public
  */
 function valid()
 {
     if ($this->__active === true) {
         return parent::valid();
     }
 }
開發者ID:carriercomm,項目名稱:pastebin-5,代碼行數:12,代碼來源:session.php


注:本文中的CakeSession::valid方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。