mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
103 lines
2.2 KiB
PHP
103 lines
2.2 KiB
PHP
<?php
|
|
/**
|
|
* Orange Management
|
|
*
|
|
* PHP Version 7.0
|
|
*
|
|
* @category TBD
|
|
* @package TBD
|
|
* @author OMS Development Team <dev@oms.com>
|
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
* @copyright 2013 Dennis Eichhorn
|
|
* @license OMS License 1.0
|
|
* @version 1.0.0
|
|
* @link http://orange-management.com
|
|
*/
|
|
namespace phpOMS\DataStorage\Session;
|
|
|
|
/**
|
|
* Session interface.
|
|
*
|
|
* Sessions can be used by http requests, console interaction and socket connections
|
|
*
|
|
* @category Framework
|
|
* @package phpOMS\DataStorage\Cache
|
|
* @author OMS Development Team <dev@oms.com>
|
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
* @license OMS License 1.0
|
|
* @link http://orange-management.com
|
|
* @since 1.0.0
|
|
*/
|
|
interface SessionInterface
|
|
{
|
|
|
|
/**
|
|
* Get session variable by key.
|
|
*
|
|
* @param \string|\int $key Value key
|
|
*
|
|
* @return mixed
|
|
*
|
|
* @since 1.0.0
|
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
*/
|
|
public function get($key);
|
|
|
|
/**
|
|
* Store session value by key.
|
|
*
|
|
* @param \string|\int $key Value key
|
|
* @param mixed $value Value to store
|
|
* @param \bool $overwrite Overwrite existing values
|
|
*
|
|
* @return \bool
|
|
*
|
|
* @since 1.0.0
|
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
*/
|
|
public function set($key, $value, \bool $overwrite = true) : \bool;
|
|
|
|
/**
|
|
* Remove value from session by key.
|
|
*
|
|
* @param \string|\int $key Value key
|
|
*
|
|
* @return \bool
|
|
*
|
|
* @since 1.0.0
|
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
*/
|
|
public function remove($key) : \bool;
|
|
|
|
/**
|
|
* Save session.
|
|
*
|
|
* @todo : implement save type (session, cache, database)
|
|
*
|
|
* @return void
|
|
*
|
|
* @since 1.0.0
|
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
*/
|
|
public function save();
|
|
|
|
/**
|
|
* @return \int|\string
|
|
*
|
|
* @since 1.0.0
|
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
*/
|
|
public function getSID();
|
|
|
|
/**
|
|
* @param \int|\string $sid
|
|
*
|
|
* @return void
|
|
*
|
|
* @since 1.0.0
|
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
*/
|
|
public function setSID($sid);
|
|
|
|
}
|