File indexing completed on 2024-06-16 05:25:46

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Auth
0017  * @subpackage Storage
0018  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0019  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0020  * @version    $Id$
0021  */
0022 
0023 /**
0024  * @category   Zend
0025  * @package    Zend_Auth
0026  * @subpackage Storage
0027  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0028  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0029  */
0030 interface Zend_Auth_Storage_Interface
0031 {
0032     /**
0033      * Returns true if and only if storage is empty
0034      *
0035      * @throws Zend_Auth_Storage_Exception If it is impossible to determine whether storage is empty
0036      * @return boolean
0037      */
0038     public function isEmpty();
0039 
0040     /**
0041      * Returns the contents of storage
0042      *
0043      * Behavior is undefined when storage is empty.
0044      *
0045      * @throws Zend_Auth_Storage_Exception If reading contents from storage is impossible
0046      * @return mixed
0047      */
0048     public function read();
0049 
0050     /**
0051      * Writes $contents to storage
0052      *
0053      * @param  mixed $contents
0054      * @throws Zend_Auth_Storage_Exception If writing $contents to storage is impossible
0055      * @return void
0056      */
0057     public function write($contents);
0058 
0059     /**
0060      * Clears contents from storage
0061      *
0062      * @throws Zend_Auth_Storage_Exception If clearing contents from storage is impossible
0063      * @return void
0064      */
0065     public function clear();
0066 }