Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SIWECOS
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cFrontendSession
  • cSession
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cSession

Backend session class.

Direct known subclasses

cFrontendSession
Package: Core\Session
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Frederic Schneider
Located at classes/class.session.php
Methods summary
public
# __construct( string $prefix = 'backend' )

cSession constructor. Starts a session if it does not yet exist.

cSession constructor. Starts a session if it does not yet exist.

Session cookies will be created with these parameters:

The session cookie will have a lifetime of 0 which means "until the browser is closed".

It will be valid for the host name of the server which generated the cookie and the path as in either the configured backend or frontend URL.

Parameters

$prefix
string
$prefix [optional] The prefix for the session variables

Since

CON-2785 the cookie path can be configured as $cfg['cookie']['path']. Configure in <CLIENT>/data/config/<ENV>/config.local.php
CON-2423 Via $cfg['secure'] you can define if the cookie should only be sent over secure connections. Configure in data/config/<ENV>/config.misc.php The session cookie is accessible only through the HTTP protocol.
public
# register( string $things )

Registers a global variable which will become persistent

Registers a global variable which will become persistent

Parameters

$things
string
$things The name of the variable (e.g. "idclient")
public
# unregister( string $name )

Unregisters a variable

Unregisters a variable

Parameters

$name
string
$name The name of the variable (e.g. "idclient")
public boolean
# isRegistered( string $name )

Checks if a variable is registered

Checks if a variable is registered

Parameters

$name
string
$name The name of the variable (e.g. "idclient")

Returns

boolean
public mixed
# url( string $url )

Attaches "&contenido=sessionid" at the end of the URL. This is no longer needed to make sessions work but some CONTENIDO functions/classes rely on it

Attaches "&contenido=sessionid" at the end of the URL. This is no longer needed to make sessions work but some CONTENIDO functions/classes rely on it

Parameters

$url
string
$url a URL

Returns

mixed
public mixed
# selfURL( )

Attaches "&contenido=1" at the end of the current URL. This is no longer needed to make sessions work but some CONTENIDO functions/classes rely on it

Attaches "&contenido=1" at the end of the current URL. This is no longer needed to make sessions work but some CONTENIDO functions/classes rely on it

Returns

mixed
public string
# serialize( mixed $var )

Returns PHP code which can be used to rebuild the variable by evaluating it. This will work recursevly on arrays

Returns PHP code which can be used to rebuild the variable by evaluating it. This will work recursevly on arrays

Parameters

$var
mixed
$var A variable which should get serialized.

Returns

string
the PHP code which can be evaluated.
protected
# _rSerialize( mixed $var, string & $str )

This function will go recursevly through arrays and objects to serialize them.

This function will go recursevly through arrays and objects to serialize them.

Parameters

$var
mixed
$var The variable
$str
string
$str The PHP code will be attached to this string
public
# freeze( )

Stores the session using PHP's own session implementation

Stores the session using PHP's own session implementation

public
# thaw( )

Rebuilds every registered variable from the session.

Rebuilds every registered variable from the session.

public
# delete( )

Deletes the session by calling session_destroy()

Deletes the session by calling session_destroy()

public
# start( )

Starts the session and rebuilds the variables

Starts the session and rebuilds the variables

Properties summary
protected array $_pt
#

Saves the registered variables

Saves the registered variables

protected string $_prefix
#

The prefix for the session variables

The prefix for the session variables

public string $id
#

Placeholder. This variable isn't needed to make sessions work any longer but some CONTENIDO functions/classes rely on it

Placeholder. This variable isn't needed to make sessions work any longer but some CONTENIDO functions/classes rely on it

public string $name
#

Placeholder. This variable isn't needed to make sessions work any longer but some CONTENIDO functions/classes rely on it

Placeholder. This variable isn't needed to make sessions work any longer but some CONTENIDO functions/classes rely on it

CMS CONTENIDO 4.10.1 API documentation generated by ApiGen 2.8.0