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
    • Slack
    • Paid Support
CakePHP

C CakePHP 2.5 API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 2.5
      • 4.2
      • 4.1
      • 4.0
      • 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

Packages

  • Cake
    • Cache
      • Engine
    • Configure
    • Console
      • Command
        • Task
    • Controller
      • Component
        • Acl
        • Auth
    • Core
    • Error
    • Event
    • I18n
    • Log
      • Engine
    • Model
      • Behavior
      • Datasource
        • Database
        • Session
      • Validator
    • Network
      • Email
      • Http
    • Routing
      • Filter
      • Route
    • TestSuite
      • Coverage
      • Fixture
      • Reporter
    • Utility
    • View
      • Helper

Classes

  • CacheSession
  • DatabaseSession

Interfaces

  • CakeSessionHandlerInterface

Interface CakeSessionHandlerInterface

Interface for Session handlers. Custom session handler classes should implement this interface as it allows CakeSession know how to map methods to session_set_save_handler()

Direct Implementers
  • CacheSession
  • DatabaseSession
Package: Cake\Model\Datasource\Session
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Location: Cake/Model/Datasource/Session/CakeSessionHandlerInterface.php

Method Summary

  • close() public
    Method called on close of a session.
  • destroy() public
    Method called on the destruction of a session.
  • gc() public

    Run the Garbage collection on the session storage. This method should vacuum all expired or dead sessions.

  • open() public
    Method called on open of a session.
  • read() public
    Method used to read from a session.
  • write() public
    Helper function called on write for sessions.

Method Detail

close() public ¶

close( )

Method called on close of a session.

Returns
boolean
Success

destroy() public ¶

destroy( integer $id )

Method called on the destruction of a session.

Parameters
integer $id
ID that uniquely identifies session in database
Returns
boolean
True for successful delete, false otherwise.

gc() public ¶

gc( integer $expires = null )

Run the Garbage collection on the session storage. This method should vacuum all expired or dead sessions.

Parameters
integer $expires optional null
Timestamp (defaults to current time)
Returns
boolean
Success

open() public ¶

open( )

Method called on open of a session.

Returns
boolean
Success

read() public ¶

read( string $id )

Method used to read from a session.

Parameters
string $id
The key of the value to read
Returns
mixed
The value of the key or false if it does not exist

write() public ¶

write( integer $id , mixed $data )

Helper function called on write for sessions.

Parameters
integer $id
ID that uniquely identifies session in database
mixed $data
The value of the data to be saved.
Returns
boolean
True for successful write, false otherwise.
OpenHub
Rackspace
Rackspace
  • 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
  • Slack
  • Paid Support

Generated using CakePHP API Docs