7
* This source file is subject to the new BSD license that is bundled
8
* with this package in the file LICENSE.txt.
9
* It is also available through the world-wide-web at this URL:
10
* http://framework.zend.com/license/new-bsd
11
* If you did not receive a copy of the license and are unable to
12
* obtain it through the world-wide-web, please send an email
13
* to license@zend.com so we can send you a copy immediately.
17
* @subpackage Zend_Auth_Storage
18
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
19
* @license http://framework.zend.com/license/new-bsd New BSD License
20
* @version $Id: NonPersistent.php 8862 2008-03-16 15:36:00Z thomas $
25
* @see Zend_Auth_Storage_Interface
27
require_once 'Zend/Auth/Storage/Interface.php';
31
* Non-Persistent Auth Storage
33
* Since HTTP Authentication happens again on each request, this will always be
34
* re-populated. So there's no need to use sessions, this simple value class
35
* will hold the data for rest of the current request.
39
* @subpackage Zend_Auth_Storage
40
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
41
* @license http://framework.zend.com/license/new-bsd New BSD License
43
class Zend_Auth_Storage_NonPersistent implements Zend_Auth_Storage_Interface
46
* Holds the actual auth data
52
* Returns true if and only if storage is empty
54
* @throws Zend_Auth_Storage_Exception If it is impossible to determine whether storage is empty
57
public function isEmpty()
59
return empty($this->_data);
63
* Returns the contents of storage
64
* Behavior is undefined when storage is empty.
66
* @throws Zend_Auth_Storage_Exception If reading contents from storage is impossible
69
public function read()
75
* Writes $contents to storage
77
* @param mixed $contents
78
* @throws Zend_Auth_Storage_Exception If writing $contents to storage is impossible
81
public function write($contents)
83
$this->_data = $contents;
87
* Clears contents from storage
89
* @throws Zend_Auth_Storage_Exception If clearing contents from storage is impossible
92
public function clear()