File indexing completed on 2024-12-22 05:36:47

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_Http
0017  * @subpackage UserAgent
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  */
0021 
0022 /**
0023  * @category   Zend
0024  * @package    Zend_Http
0025  * @subpackage UserAgent
0026  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0027  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0028  */
0029 interface Zend_Http_UserAgent_Storage
0030 {
0031     /**
0032      * Returns true if and only if storage is empty
0033      *
0034      * @throws Zend_Http_UserAgent_Storage_Exception If it is impossible to determine whether storage is empty
0035      * @return boolean
0036      */
0037     public function isEmpty();
0038 
0039     /**
0040      * Returns the contents of storage associated to the key parameter
0041      *
0042      * Behavior is undefined when storage is empty.
0043      *
0044      * @throws Zend_Http_UserAgent_Storage_Exception If reading contents from storage is impossible
0045      * @return mixed
0046      */
0047     public function read();
0048 
0049     /**
0050      * Writes $contents associated to the key parameter to storage
0051      *
0052      * @param  mixed $contents
0053      * @throws Zend_Http_UserAgent_Storage_Exception If writing $contents to storage is impossible
0054      * @return void
0055      */
0056     public function write($contents);
0057 
0058     /**
0059      * Clears contents from storage
0060      *
0061      * @throws Zend_Http_UserAgent_Storage_Exception If clearing contents from storage is impossible
0062      * @return void
0063      */
0064     public function clear();
0065 }