Source of file Session.php
Size: 1,593 Bytes - Last Modified: 2017-11-08T13:54:24+00:00
/home/travis/build/bluzphp/framework/src/Proxy/Session.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 | <?php /** * Bluz Framework Component * * @copyright Bluz PHP Team * @link https://github.com/bluzphp/framework */ declare(strict_types=1); namespace Bluz\Proxy; use Bluz\Session\Session as Instance; /** * Proxy to Session * * Example of usage * <code> * use Bluz\Proxy\Session; * * // lazy session loading * Session::set('some key in session', 'value example'); * Session::get('some key in session'); * </code> * * @package Bluz\Proxy * @author Anton Shevchuk * * @method static Instance getInstance() * * @method static void start() * @see Instance::start() * @method static void destroy() * @see Instance::destroy() * @method static void set($key, $value) * @see Instance::set() * @method static mixed get($key) * @see Instance::get() * @method static bool contains($key) * @see Instance::contains() * @method static void delete($key) * @see Instance::delete() * @method static string getId() * @see Instance::getId() * @method static bool regenerateId($deleteOldSession = true) * @see Instance::regenerateId() * @method static void setSessionCookieLifetime($ttl) * @see Instance::setSessionCookieLifetime() * * @method static void expireSessionCookie() */ final class Session { use ProxyTrait; /** * Init instance * * @return Instance */ private static function initInstance() { $instance = new Instance(); $instance->setOptions(Config::getData('session')); return $instance; } } |