Documentation

Layer

Configuration routines

Tags
subpackage

Session

author

Dodonov A.A.

version

v.1.0 (2021/11/13)

copyright

Copyright (c) 2021, http://aeon.su

Table of Contents

$cookies  : mixed
Cookies
$sessionWasStarted  : bool
Was the session started
sessionId()  : string
Method setups session id
sessionName()  : string
Method returns session's name
sessionWriteClose()  : bool
Write session data and end session
setCookie()  : bool
Method sets cookie
startSession()  : bool
Method starts session
wasSessionStarted()  : bool
Method returns information was the session started

Properties

$cookies

Cookies

public static mixed $cookies = []

$sessionWasStarted

Was the session started

private static bool $sessionWasStarted = false

Methods

sessionId()

Method setups session id

public static sessionId([string $id = '' ]) : string
Parameters
$id : string = ''

id of the session

Return values
string

session's name

sessionName()

Method returns session's name

public static sessionName() : string
Return values
string

session's name

sessionWriteClose()

Write session data and end session

public static sessionWriteClose() : bool
Return values
bool

true on success or false on failure

setCookie()

Method sets cookie

public static setCookie(string $name[, string $value = "" ], int $expires[, string $path = "" ][, string $domain = "" ][, bool $secure = false ][, bool $httponly = false ]) : bool
Parameters
$name : string

cookie name

$value : string = ""

cookie value

$expires : int

expires

$path : string = ""

paht of the cookie

$domain : string = ""

domain

$secure : bool = false

secure?

$httponly : bool = false

http only?

Return values
bool

true on success, false otherwise

startSession()

Method starts session

public static startSession() : bool
Return values
bool

true if the session was started, false otherwise

wasSessionStarted()

Method returns information was the session started

public static wasSessionStarted() : bool
Return values
bool

true if the session was started, false otherwise.

Search results

    Яндекс.Метрика