CookieStore
class CookieStore extends BaseStore (View source)
A session store which stores the session data in an encrypted & signed cookie.
This way the server doesn't need to open a database connection or have a shared filesystem for reading the session from - the client passes through the session with every request.
This approach does have some limitations - cookies can only be quite small (4K total, but we limit to 1K) and can only be set before the server starts sending a response.
So we clear the cookie on Session startup (which should always be before the headers get sent), but just fail on Session write if we can't use cookies, assuming there's something watching for that & providing a fallback
Traits
Provides extensions to this object to integrate it with standard config API methods.
Properties
static private | $max_length | Maximum length of a cookie value in characters |
Methods
Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).
Gets the uninherited value for the given config option
No description
No description
No description
No description
No description
No description
Details
static Config_ForClass
config()
Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).
mixed
uninherited(string $name)
Gets the uninherited value for the given config option
void
setKey(string|null $key)
Assign a new session secret key