Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Authentication / Storage / NonPersistent.php
blob4f9a4a8dc01df2c8c26c8bf719460a63483609ae
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\Authentication\Storage;
12 /**
13 * Non-Persistent Authentication Storage
15 * Since HTTP Authentication happens again on each request, this will always be
16 * re-populated. So there's no need to use sessions, this simple value class
17 * will hold the data for rest of the current request.
19 class NonPersistent implements StorageInterface
21 /**
22 * Holds the actual auth data
24 protected $data;
26 /**
27 * Returns true if and only if storage is empty
29 * @return bool
31 public function isEmpty()
33 return empty($this->data);
36 /**
37 * Returns the contents of storage
38 * Behavior is undefined when storage is empty.
40 * @return mixed
42 public function read()
44 return $this->data;
47 /**
48 * Writes $contents to storage
50 * @param mixed $contents
51 * @return void
53 public function write($contents)
55 $this->data = $contents;
58 /**
59 * Clears contents from storage
61 * @return void
63 public function clear()
65 $this->data = null;