Метод | Описание | |
---|---|---|
__construct ( mixed $id, string $name, integer | DateTime $lifetime, integer | null $maximumAge, string | null $domain, string $path, boolean $secure, boolean $httpOnly ) | Constructor to initialize a newly created session. | |
addTag ( string $tag ) : void | Tags this session with the given tag. | |
canBeResumed ( ) : boolean | Returns TRUE if there is a session that can be resumed. | |
checksum ( ) : string | Returns the checksum for this session instance. | |
destroy ( string $reason ) : void | Explicitly destroys all session data. | |
emptyInstance ( ) : AppserverIo\Psr\Servlet\ServletSessionInterface | Creates a new and empty session instance. | |
getData ( string $key ) : mixed | Returns the data associated with the given key. | |
getDomain ( ) : string | null | Returns the host to which the user agent will send this cookie. | |
getId ( ) : string | Returns the current session identifier. | |
getLastActivityTimestamp ( ) : integer | Returns the unix time stamp marking the last point in time this session has been in use. | |
getLifetime ( ) : integer | DateTime | Returns date and time after the session expires. | |
getMaximumAge ( ) : integer | null | Returns the number of seconds until the session expires. | |
getName ( ) : string | Returns the session name. | |
getPath ( ) : string | Returns the path describing the scope of this cookie. | |
getTags ( ) : array | Returns the tags this session has been tagged with. | |
hasKey ( string $key ) : boolean | Returns TRUE if a session data entry $key is available. | |
init ( mixed $id, string $name, integer | DateTime $lifetime, integer | null $maximumAge, string | null $domain, string $path, boolean $secure, boolean $httpOnly, integer | null $lastActivityTimestamp = null ) : void | Initializes the session with the passed data. | |
isHttpOnly ( ) : boolean | Returns if this session should only be used through the HTTP protocol. | |
isSecure ( ) : boolean | Returns if this session should only be sent through a "secure" channel by the user agent. | |
isStarted ( ) : boolean | Tells if the session has been started already. | |
putData ( string $key, mixed $data ) : void | Stores the given data under the given key in the session | |
removeData ( string $key ) : void | Removes the session data entry $key from the session. | |
removeTag ( string $tag ) : void | Removes the specified tag from this session. | |
resume ( ) : integer | Resumes an existing session, if any. | |
setDomain ( string $domain ) : void | Sets the host to which the user agent will send this cookie. | |
setHttpOnly ( boolean $httpOnly = true ) : void | Sets the flag that this session should only be used through the HTTP protocol. | |
setId ( string $id ) : void | Sets the current session identifier. | |
setLifetime ( integer | DateTime $lifetime ) : void | Sets date and time after the session expires. | |
setMaximumAge ( integer $maximumAge ) : void | Sets the number of seconds until the session expires. | |
setName ( string $name ) : void | Sets the session name. | |
setPath ( string $path ) : void | Sets the path describing the scope of this cookie. | |
setSecure ( boolean $secure = true ) : void | Sets the flag that this session should only be sent through a "secure" channel by the user agent. | |
start ( ) : void | Starts the session, if it has not been already started |
Метод | Описание | |
---|---|---|
autoExpire ( ) : boolean | Automatically expires the session if the user has been inactive for too long. |
public __construct ( mixed $id, string $name, integer | DateTime $lifetime, integer | null $maximumAge, string | null $domain, string $path, boolean $secure, boolean $httpOnly ) | ||
$id | mixed | The session ID |
$name | string | The session name |
$lifetime | integer | DateTime | Date and time after the session expires |
$maximumAge | integer | null | Number of seconds until the session expires |
$domain | string | null | The host to which the user agent will send this cookie |
$path | string | The path describing the scope of this cookie |
$secure | boolean | If this cookie should only be sent through a "secure" channel by the user agent |
$httpOnly | boolean | If this cookie should only be used through the HTTP protocol |
protected autoExpire ( ) : boolean | ||
Результат | boolean | TRUE if the session expired, FALSE if not |
public canBeResumed ( ) : boolean | ||
Результат | boolean | TRUE if the session can be resumed, else FALSE |
public static emptyInstance ( ) : AppserverIo\Psr\Servlet\ServletSessionInterface | ||
Результат | AppserverIo\Psr\Servlet\ServletSessionInterface | The empty, but initialized session instance |
public getLastActivityTimestamp ( ) : integer | ||
Результат | integer | UNIX timestamp |
public getLifetime ( ) : integer | DateTime | ||
Результат | integer | DateTime | The date and time after the session expires |
public getMaximumAge ( ) : integer | null | ||
Результат | integer | null | Number of seconds until the session expires |
public init ( mixed $id, string $name, integer | DateTime $lifetime, integer | null $maximumAge, string | null $domain, string $path, boolean $secure, boolean $httpOnly, integer | null $lastActivityTimestamp = null ) : void | ||
$id | mixed | The session ID |
$name | string | The session name |
$lifetime | integer | DateTime | Date and time after the session expires |
$maximumAge | integer | null | Number of seconds until the session expires |
$domain | string | null | The host to which the user agent will send this cookie |
$path | string | The path describing the scope of this cookie |
$secure | boolean | If this cookie should only be sent through a "secure" channel by the user agent |
$httpOnly | boolean | If this cookie should only be used through the HTTP protocol |
$lastActivityTimestamp | integer | null | The timestamp when the session has been touched the last time |
Результат | void |
public isHttpOnly ( ) : boolean | ||
Результат | boolean | TRUE if the session should only be used through the HTTP protocol |
public removeData ( string $key ) : void | ||
$key | string | Entry identifier of the session data to remove |
Результат | void |
public setHttpOnly ( boolean $httpOnly = true ) : void | ||
$httpOnly | boolean | TRUE if the session should only be used through the HTTP protocol |
Результат | void |
public setLifetime ( integer | DateTime $lifetime ) : void | ||
$lifetime | integer | DateTime | The date and time after the session expires |
Результат | void |
public setMaximumAge ( integer $maximumAge ) : void | ||
$maximumAge | integer | Number of seconds until the session expires |
Результат | void |