summaryrefslogtreecommitdiff
path: root/framework/Web/THttpSession.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2015-01-20 22:16:10 +0100
committerFabio Bas <ctrlaltca@gmail.com>2015-01-20 22:16:10 +0100
commitef4d964de440970b76ab48fcbd6748f43675efa3 (patch)
treea6a6ffa6d53ffaa12c2d5bd6f036e4c013481f26 /framework/Web/THttpSession.php
parent7254793d2bbe3f2f3d87d97172c54a54deea0a3a (diff)
one class per file: framework/Web/*.php
Diffstat (limited to 'framework/Web/THttpSession.php')
-rw-r--r--framework/Web/THttpSession.php110
1 files changed, 1 insertions, 109 deletions
diff --git a/framework/Web/THttpSession.php b/framework/Web/THttpSession.php
index 6a2a3977..4b75c98f 100644
--- a/framework/Web/THttpSession.php
+++ b/framework/Web/THttpSession.php
@@ -626,112 +626,4 @@ class THttpSession extends TApplicationComponent implements IteratorAggregate,Ar
{
unset($_SESSION[$offset]);
}
-}
-
-/**
- * TSessionIterator class
- *
- * TSessionIterator implements Iterator interface.
- *
- * TSessionIterator is used by THttpSession. It allows THttpSession to return a new iterator
- * for traversing the session variables.
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Web
- * @since 3.0
- */
-class TSessionIterator implements Iterator
-{
- /**
- * @var array list of keys in the map
- */
- private $_keys;
- /**
- * @var mixed current key
- */
- private $_key;
-
- /**
- * Constructor.
- * @param array the data to be iterated through
- */
- public function __construct()
- {
- $this->_keys=array_keys($_SESSION);
- }
-
- /**
- * Rewinds internal array pointer.
- * This method is required by the interface Iterator.
- */
- public function rewind()
- {
- $this->_key=reset($this->_keys);
- }
-
- /**
- * Returns the key of the current array element.
- * This method is required by the interface Iterator.
- * @return mixed the key of the current array element
- */
- public function key()
- {
- return $this->_key;
- }
-
- /**
- * Returns the current array element.
- * This method is required by the interface Iterator.
- * @return mixed the current array element
- */
- public function current()
- {
- return isset($_SESSION[$this->_key])?$_SESSION[$this->_key]:null;
- }
-
- /**
- * Moves the internal pointer to the next array element.
- * This method is required by the interface Iterator.
- */
- public function next()
- {
- do
- {
- $this->_key=next($this->_keys);
- }
- while(!isset($_SESSION[$this->_key]) && $this->_key!==false);
- }
-
- /**
- * Returns whether there is an element at current position.
- * This method is required by the interface Iterator.
- * @return boolean
- */
- public function valid()
- {
- return $this->_key!==false;
- }
-}
-
-
-/**
- * THttpSessionCookieMode class.
- * THttpSessionCookieMode defines the enumerable type for the possible methods of
- * using cookies to store session ID.
- *
- * The following enumerable values are defined:
- * - None: not using cookie.
- * - Allow: using cookie.
- * - Only: using cookie only.
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Web
- * @since 3.0.4
- */
-class THttpSessionCookieMode extends TEnumerable
-{
- const None='None';
- const Allow='Allow';
- const Only='Only';
-}
-
+} \ No newline at end of file