Session::remove()

mixed remove(string $name) Removes an attribute. Parameters string $name Return Value mixed The removed value or null when it does not exist

Session::setId()

setId(string $id) Sets the session ID. Parameters string $id

Session::setName()

setName(string $name) Sets the session name. Parameters string $name

Session::replace()

replace(array $attributes) Sets attributes. Parameters array $attributes Attributes

Session::invalidate()

bool invalidate(int $lifetime = null) Invalidates the current session. Clears all session attributes and flashes and regenerates the session and deletes the old session from persistence. Parameters int $lifetime Sets the cookie lifetime for the session cookie. A null value will leave the system settings unchanged, 0 sets the cookie to expire with browser session. Time is in seconds, and is not a Unix timestamp. Return Value bool True if session invalidated, false if error

Session::migrate()

bool migrate(bool $destroy = false, int $lifetime = null) Migrates the current session to a new session id while maintaining all session attributes. Parameters bool $destroy Whether to delete the old session or leave it to garbage collection int $lifetime Sets the cookie lifetime for the session cookie. A null value will leave the system settings unchanged, 0 sets the cookie to expire with browser session. Time is in seconds, and is not a Unix timestamp. Return Value bool True

Session::has()

bool has(string $name) Checks if an attribute is defined. Parameters string $name The attribute name Return Value bool true if the attribute is defined, false otherwise

Session::getName()

mixed getName() Returns the session name. Return Value mixed The session name

Session::registerBag()

registerBag(SessionBagInterface $bag) Registers a SessionBagInterface with the session. Parameters SessionBagInterface $bag

Session::isStarted()

bool isStarted() Checks if the session was started. Return Value bool