Overview

Namespaces

  • LeanCloud
    • Engine
    • Operation
    • Storage
    • Uploader

Classes

  • CookieStorage
  • SessionStorage

Interfaces

  • IStorage
  • Overview
  • Namespace
  • Class

Class SessionStorage

Session Based Storage

$_SESSION based key-value storage for persistence.

Note that PHP stores session data by default in local file, which means the storage data will only be available to local server instance. In a distributed deployment, requests of same user might be routed to different instances, where session data might be not avaialible. In such cases this session based storage should not be used.

LeanCloud\Storage\SessionStorage implements LeanCloud\Storage\IStorage
Namespace: LeanCloud\Storage
Located at LeanCloud/Storage/SessionStorage.php
Methods summary
public
# __construct( )

Initialize session storage

Initialize session storage

public
# set( string $key, mixed $val )

Set value by key

Set value by key

Parameters

$key
$val

Returns


$this

Implementation of

LeanCloud\Storage\IStorage::set()
public mixed
# get( string $key )

Get value by key

Get value by key

Parameters

$key

Returns

mixed

Implementation of

LeanCloud\Storage\IStorage::get()
public
# remove( string $key )

Remove key from storage

Remove key from storage

Parameters

$key

Returns


$this

Implementation of

LeanCloud\Storage\IStorage::remove()
public
# clear( )

Clear all data in storage

Clear all data in storage

Returns


$this

Implementation of

LeanCloud\Storage\IStorage::clear()
API documentation generated by ApiGen