Overview

Namespaces

  • Alpha
    • Controller
      • Front
    • Exception
    • Model
      • Type
    • Task
    • Util
      • Backup
      • Cache
      • Code
        • Highlight
        • Metric
      • Config
      • Convertor
      • Email
      • Extension
      • Feed
      • File
      • Graph
      • Helper
      • Http
        • Filter
        • Session
      • Image
      • Logging
      • Search
      • Security
    • View
      • Renderer
        • Html
        • Json
      • Widget

Classes

  • SessionProviderArray
  • SessionProviderFactory
  • SessionProviderPHP

Interfaces

  • SessionProviderInterface
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: 
  3: namespace Alpha\Util\Http\Session;
  4: 
  5: /**
  6:  * An interface that describes the use of sessions.
  7:  *
  8:  * @since 2.0
  9:  *
 10:  * @author John Collins <dev@alphaframework.org>
 11:  * @license http://www.opensource.org/licenses/bsd-license.php The BSD License
 12:  * @copyright Copyright (c) 2015, John Collins (founder of Alpha Framework).
 13:  * All rights reserved.
 14:  *
 15:  * <pre>
 16:  * Redistribution and use in source and binary forms, with or
 17:  * without modification, are permitted provided that the
 18:  * following conditions are met:
 19:  *
 20:  * * Redistributions of source code must retain the above
 21:  *   copyright notice, this list of conditions and the
 22:  *   following disclaimer.
 23:  * * Redistributions in binary form must reproduce the above
 24:  *   copyright notice, this list of conditions and the
 25:  *   following disclaimer in the documentation and/or other
 26:  *   materials provided with the distribution.
 27:  * * Neither the name of the Alpha Framework nor the names
 28:  *   of its contributors may be used to endorse or promote
 29:  *   products derived from this software without specific
 30:  *   prior written permission.
 31:  *
 32:  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
 33:  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
 34:  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 35:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 36:  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
 37:  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 38:  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 39:  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 40:  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 41:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 42:  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 43:  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 44:  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 45:  * </pre>
 46:  */
 47: interface SessionProviderInterface
 48: {
 49:     /**
 50:      * Starts a new session, or resumes an existing session if there is already a session ID available.
 51:      *
 52:      * @since 2.0
 53:      */
 54:     public function init();
 55: 
 56:     /**
 57:      * Destroys the current session.
 58:      *
 59:      * @since 2.0
 60:      */
 61:     public function destroy();
 62: 
 63:     /**
 64:      * Get the key value from the session.  Returns false if nothing is found.
 65:      *
 66:      * @param $key
 67:      *
 68:      * @since 2.0
 69:      *
 70:      * @return mixed
 71:      */
 72:     public function get($key);
 73: 
 74:     /**
 75:      * Stores the value provided at that key in the session.
 76:      *
 77:      * @param string $key
 78:      * @param mixed  $value
 79:      *
 80:      * @since 2.0
 81:      */
 82:     public function set($key, $value);
 83: 
 84:     /**
 85:      * Deletes the value provided at that key in the session.
 86:      *
 87:      * @param string $key
 88:      * @param mixed  $value
 89:      *
 90:      * @since 2.0
 91:      */
 92:     public function delete($key);
 93: 
 94:     /**
 95:      * Get the current session ID if available.
 96:      *
 97:      * @return string
 98:      *
 99:      * @since 2.0
100:      */
101:     public function getID();
102: }
103: 
Alpha Framework 2.0.4 API Documentation API documentation generated by ApiGen 2.8.0