SessionHandlerInterface

SessionHandlerInterface

Provides forward compatibility with PHP 5.4

Extensive documentation can be found at php.net, see links:

Summary

No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

open()

open(string  $savePath, string  $sessionName) : boolean

Open session.

Parameters

string $savePath

Save path.

string $sessionName

Session Name.

Throws

RuntimeException

If something goes wrong starting the session.

Returns

boolean

See also

Tags

None found

close()

close() : boolean

Close session.

Returns

boolean

See also

Tags

None found

read()

read(string  $sessionId) : string

Read session.

Parameters

string $sessionId

Throws

RuntimeException

On fatal error but not "record not found".

Returns

string —

String as stored in persistent storage or empty string in all other cases.

See also

Tags

None found

write()

write(string  $sessionId, string  $data) : boolean

Commit session to storage.

Parameters

string $sessionId

Session ID.

string $data

Session serialized data to save.

Returns

boolean

See also

Tags

None found

destroy()

destroy(string  $sessionId) : boolean

Destroys this session.

Parameters

string $sessionId

Session ID.

Throws

RuntimeException

On fatal error.

Returns

boolean

See also

Tags

None found

gc()

gc(integer  $lifetime) : boolean

Garbage collection for storage.

Parameters

integer $lifetime

Max lifetime in seconds to keep sessions stored.

Throws

RuntimeException

On fatal error.

Returns

boolean

See also

Tags

None found