This is an old revision of the document!
Table of Contents
SessionMaker
Layer: Core · Source: lib/core/SessionMaker.php:17 (lines 17–377)
class SessionMaker extends \SessionHandler
Docblock Metadata
^ Tag ^ Value ^ | ''@category'' | Core Class | | ''@author'' | M.Noermoehammad | | ''@license'' | MIT | | ''@version'' | 1.0 |
Inheritance
^ Relation ^ Type ^ Meaning ^ | extends | ''\SessionHandler'' | parent class/interface |
Constants (0)
None.
Properties (1)
^ Visibility ^ Type ^ Name ^ Default ^ Line ^ | ''protected'' | ''(untyped)'' | ''$cookie'' | ''[];'' | 41 |
Methods (13)
^ Visibility ^ Method ^ Summary ^ Line ^ | public | ''__construct()'' | Instantiate session cookies | 52 | | private | ''setup()'' | setup | 113 | | public | ''start()'' | start | 141 | | public | ''forget()'' | forget | 178 | | public | ''refresh()'' | refresh | 200 | | public | ''read()'' | read | 212 | | public | ''write()'' | write | 235 | | public | ''isExpired()'' | isExpired | 255 | | public | ''isGenuine()'' | isGenuine | 274 | | public | ''isValid()'' | isValid | 299 | | protected | ''encrypt()'' | encrypy | 312 | | protected | ''decrypt()'' | decrypt | 329 | | private | ''isSessionStarted()'' | isSessionStarted | 364 |
__construct()
public function __construct($key, $name = '_scriptlog', $cookie = [])
lines 52–102 (51)
Instantiate session cookies
^ Parameter ^ Type ^ Default ^ Description ^ | ''$key'' | ''(untyped)'' | //required// | //none// | | ''$name'' | ''(untyped)'' | '''_scriptlog''' | //none// | | ''$cookie'' | ''(untyped)'' | ''[]'' | //none// |
setup()
private function setup()
lines 113–132 (20)
set the session cookie parameters
Takes no parameters.
Returns: (none declared) — void
start()
public function start()
lines 141–169 (29)
Takes no parameters.
Returns: (none declared) — bool
forget()
public function forget()
lines 178–192 (15)
destroy session
Takes no parameters.
Returns: (none declared) — void
refresh()
public function refresh()
lines 200–203 (4)
Takes no parameters.
Returns: (none declared) — bool
read()
public function read($id): string
lines 212–226 (15)
^ Parameter ^ Type ^ Default ^ Description ^ | ''$id'' | ''(untyped)'' | //required// | //none// |
Returns: string — string
write()
public function write($id, $data): bool
lines 235–246 (12)
^ Parameter ^ Type ^ Default ^ Description ^ | ''$id'' | ''(untyped)'' | //required// | //none// | | ''$data'' | ''(untyped)'' | //required// | //none// |
Returns: bool — boolean
isExpired()
public function isExpired($ttl = 60)
lines 255–267 (13)
isExpired
^ Parameter ^ Type ^ Default ^ Description ^ | ''$ttl'' | ''(untyped)'' | ''60'' | //none// |
Returns: (none declared) — boolean
isGenuine()
public function isGenuine()
lines 274–290 (17)
isGenuine
Takes no parameters.
Returns: (none declared) — boolean
isValid()
public function isValid($ttl = 60)
lines 299–302 (4)
isValid
^ Parameter ^ Type ^ Default ^ Description ^ | ''$ttl'' | ''(untyped)'' | ''60'' | //none// |
Returns: (none declared) — boolean
encrypt()
protected function encrypt($data, $key)
lines 312–320 (9)
^ Parameter ^ Type ^ Default ^ Description ^ | ''$data'' | ''(untyped)'' | //required// | //none// | | ''$key'' | ''(untyped)'' | //required// | //none// |
Returns: (none declared) — string
decrypt()
protected function decrypt($data, $key)
lines 329–355 (27)
^ Parameter ^ Type ^ Default ^ Description ^ | ''$data'' | ''(untyped)'' | //required// | //none// | | ''$key'' | ''(untyped)'' | //required// | //none// |
Returns: (none declared) — string
isSessionStarted()
private function isSessionStarted()
lines 364–376 (13)
isSessionStarted
Takes no parameters.
Returns: (none declared) — boolean
This page is generated from source by 'tools/gendoc'. Edits will be overwritten.
