CHttpSessionIterator
| 鍖 | system.web |
|---|---|
| 缁ф壙 | class CHttpSessionIterator |
| 瀹炵幇 | Iterator, Traversable |
| 婧愯嚜 | 1.0 |
| 鐗堟湰 | $Id: CHttpSessionIterator.php 2799 2011-01-01 19:31:13Z qiang.xue $ |
| 婧愮爜 | framework/web/CHttpSessionIterator.php |
鍏叡鏂规硶
| 鏂规硶 | 鎻忚堪 | 瀹氫箟鍦 |
|---|---|---|
| __construct() | 鏋勯犳柟娉曘 | CHttpSessionIterator |
| current() | 杩斿洖褰撳墠鏁扮粍鍏冪礌銆 | CHttpSessionIterator |
| key() | 杩斿洖褰撳墠鏁扮粍鍏冪礌鐨勯敭銆 | CHttpSessionIterator |
| next() | 绉诲姩鍐呴儴鎸囬拡鍒颁笅涓涓暟缁勫厓绱犮 | CHttpSessionIterator |
| rewind() | 鍊掑洖鍐呴儴鏁扮粍鎸囬拡銆 | CHttpSessionIterator |
| valid() | 杩斿洖鍦ㄥ綋鍓嶄綅缃槸鍚︽湁涓涓厓绱犮 | CHttpSessionIterator |
鏂规硶璇︾粏
__construct()
鏂规硶
|
public void __construct()
|
婧愮爜锛 framework/web/CHttpSessionIterator.php#36 (鏄剧ず)
public function __construct()
{
$this->_keys=array_keys($_SESSION);
}
鏋勯犳柟娉曘
current()
鏂规硶
|
public mixed current()
| ||
| {return} | mixed | 褰撳墠鏁扮粍鍏冪礌 |
婧愮爜锛 framework/web/CHttpSessionIterator.php#65 (鏄剧ず)
public function current()
{
return isset($_SESSION[$this->_key])?$_SESSION[$this->_key]:null;
}
杩斿洖褰撳墠鏁扮粍鍏冪礌銆 杩欎釜鏂规硶鏄鎺ュ彛杩唬鍣ㄨ姹傜殑銆
key()
鏂规硶
|
public mixed key()
| ||
| {return} | mixed | 褰撳墠鏁扮粍鍏冪礌鐨勯敭 |
杩斿洖褰撳墠鏁扮粍鍏冪礌鐨勯敭銆 杩欎釜鏂规硶鏄鎺ュ彛杩唬鍣ㄨ姹傜殑銆
next()
鏂规硶
|
public void next()
|
婧愮爜锛 framework/web/CHttpSessionIterator.php#74 (鏄剧ず)
public function next()
{
do
{
$this->_key=next($this->_keys);
}
while(!isset($_SESSION[$this->_key]) && $this->_key!==false);
}
绉诲姩鍐呴儴鎸囬拡鍒颁笅涓涓暟缁勫厓绱犮 杩欎釜鏂规硶鏄綋鍓嶆帴鍙h凯浠e櫒瑕佹眰鐨勩
rewind()
鏂规硶
|
public void rewind()
|
婧愮爜锛 framework/web/CHttpSessionIterator.php#45 (鏄剧ず)
public function rewind()
{
$this->_key=reset($this->_keys);
}
鍊掑洖鍐呴儴鏁扮粍鎸囬拡銆 杩欎釜鏂规硶鏄綋鍓嶆帴鍙h凯浠e櫒瑕佹眰鐨勩
valid()
鏂规硶
|
public boolean valid()
| ||
| {return} | boolean | |
婧愮爜锛 framework/web/CHttpSessionIterator.php#88 (鏄剧ず)
public function valid()
{
return $this->_key!==false;
}
杩斿洖鍦ㄥ綋鍓嶄綅缃槸鍚︽湁涓涓厓绱犮 杩欎釜鏂规硶鏄綋鍓嶆帴鍙h凯浠e櫒瑕佹眰鐨勩