FileSessionHandler
class FileSessionHandler extends AbstractSessionHandler (View source)
Session save handler that stores session data in the filesystem as defined by session.save_path ini configuration.
Similar to PHP's default filesystem session handler, except it doesn't lock the session file meaning sessions are non-blocking.
Constants
| SESSION_FILE_PREFIX |
|
Methods
Check the PHP session ID i.e. PHPSESSID is valid against the default PHP session ID format.
Details
protected int
getLifetime()
Get the session lifetime in seconds.
Returns the cookie lifetime if it's non-zero, otherwise returns the garbage collection lifetime.
protected void
checkSessionID(string $id)
Check the PHP session ID i.e. PHPSESSID is valid against the default PHP session ID format.
This is a security measure to prevent people from injecting invalid session IDs in the request.
This only needs to be called on read() We do not need to call this on write(), destroy(), updateTimestamp(), or validateId() as those methods are only called for session IDs that have already been accepted by PHP.
bool
close()
No description
bool
destroy(string $id)
No description
int|false
gc(int $max_lifetime)
No description
bool
open(string $path, string $name)
No description
string|false
read(string $id)
No description
bool
write(string $id, string $data)
No description
bool
validateId(string $id)
No description
bool
updateTimestamp(string $id, string $data)
No description