CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (Github)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C CakePHP 6.0 API

  • Project:
    • CakePHP
      • CakePHP
      • Authentication
      • Authorization
      • Chronos
      • Elastic Search
      • Queue
  • Version:
    • 6.0
      • 6.0
      • 5.4
      • 5.3
      • 5.2
      • 5.1
      • 5.0
      • 4.6
      • 4.5
      • 4.4
      • 4.3
      • 4.2
      • 4.1
      • 4.0
      • 3.10
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Namespaces

  • Global
  • Cake
    • AttributeResolver
    • Cache
    • Collection
    • Command
    • Console
    • Container
    • Controller
    • Core
    • Database
    • Datasource
    • Error
    • Event
    • Form
    • Http
      • Client
      • Cookie
      • Exception
      • Link
      • Middleware
      • RateLimit
      • Response
      • Session
      • TestSuite
    • I18n
    • Lock
    • Log
    • Mailer
    • Network
    • ORM
    • Routing
    • TestSuite
    • Utility
    • Validation
    • View

Class AbstractSession

Abstract session save handler.

Abstract
Namespace: Cake\Http\Session

Method Summary

  • close() public

    Method called on close of a database session.

  • create_sid() public

    Create a new session ID.

  • destroy() abstract public

    Destroy a session.

  • gc() abstract public

    Cleanup old sessions.

  • open() public

    Method called on open of a database session.

  • read() abstract public

    Read session data.

  • validateId() public

    Validate a session ID.

  • write() abstract public

    Write session data.

Method Detail

close() ¶ public

close(): bool

Method called on close of a database session.

Returns
bool

Success

create_sid() ¶ public

create_sid(): string

Create a new session ID.

Returns
string

destroy() ¶ abstract public

destroy(string $id): bool

Destroy a session.

Parameters
string $id

ID that uniquely identifies session in cache.

Returns
bool

gc() ¶ abstract public

gc(int $max_lifetime): int|false

Cleanup old sessions.

Parameters
int $max_lifetime

Sessions that have not updated for the last maxlifetime seconds will be removed.

Returns
int|false

open() ¶ public

open(string $path, string $name): bool

Method called on open of a database session.

Parameters
string $path

The path where to store/retrieve the session.

string $name

The session name.

Returns
bool

Success

read() ¶ abstract public

read(string $id): string|false

Read session data.

Parameters
string $id

ID that uniquely identifies session in cache.

Returns
string|false

Session data or false if it does not exist.

validateId() ¶ public

validateId(string $id): bool

Validate a session ID.

Parameters
string $id

The session ID to validate.

Returns
bool

write() ¶ abstract public

write(string $id, string $data): bool

Write session data.

Parameters
string $id

ID that uniquely identifies session in cache.

string $data

The data to be saved.

Returns
bool

True for successful write, false otherwise.

OpenHub
Pingping
Linode
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (Github)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs