ICanBoogie/ICanBoogie v2.3.1
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Autoconfig
    • Core
    • HTTP
      • Dispatcher
    • Session

Classes

  • Core
  • Debug
  • Helpers
  • Logger
  • LogLevel
  • Session

Interfaces

  • LoggerInterface

Traits

  • LoggerTrait

Exceptions

  • AlreadyAuthenticated
  • AuthenticationRequired
  • CoreAlreadyBooted
  • CoreAlreadyInstantiated
  • CoreNotInstantiated
  • PermissionRequired
  • SecurityException

Constants

  • TOKEN_ALPHA
  • TOKEN_ALPHA_UPCASE
  • TOKEN_NUMERIC
  • TOKEN_SYMBOL
  • TOKEN_SYMBOL_WIDE

Functions

  • app
  • boot
  • excerpt
  • generate_token
  • generate_token_wide
  • get_autoconfig
  • log
  • log_error
  • log_info
  • log_success
  • log_time
  • normalize_namespace_part
  • pbkdf2
  • resolve_app_paths
  • strip_root

Class Session

Session.

Namespace: ICanBoogie
Located at Session.php

Methods summary

public static boolean
# exists( )

Checks if a session identifier can be found to retrieve a session.

Checks if a session identifier can be found to retrieve a session.

Returns

boolean
true if the session identifier exists in the cookie, false otherwise.
public static ICanBoogie\Session
# get_session( ICanBoogie\Core $app )

Returns a Session instance.

Returns a Session instance.

The session is initialized when the session object is created.

Once the session is created the start event is fired with the session as sender.

Parameters

$app

Returns

ICanBoogie\Session
public
# __construct( array $options = [] )

Constructor.

Constructor.

In order to circumvent session fixation and session hijacking, the user agent hash is attached to the session. A previous session can only be restored if the user agent hash match.

The session is destroyed when the values don't match and the "location" header is set to request a reload.

Parameters

$options
protected array
# prepare_options( array $options )

Prepare session options.

Prepare session options.

Parameters

$options

Returns

array
protected
# apply_options( array $options )

Applies options.

Applies options.

Parameters

$options
protected
# apply_use_trans_id( $use_trans_sid )

Applies session.use_trans_sid.

Applies session.use_trans_sid.

Parameters

$use_trans_sid
public boolean|null
# regenerate_id( boolean $delete_old_session = false )

Regenerates the id of the session.

Regenerates the id of the session.

Parameters

$delete_old_session

Returns

boolean|null

true when the id is regenerated, false when it is not, null when the application is running from CLI.

public string
# regenerate_token( )

Regenerates the session token.

Regenerates the session token.

The token_time property is updated to the current time.

Returns

string
The new session token.
public &
# __get( $property )
public
# __set( $property, $value )
public
# __isset( $property )
public
# __unset( $property )

Properties summary

public static array $defaults
# [ 'id' => null, 'name' => 'ICanBoogie', 'domain' => null, 'use_cookies' => true, 'use_only_cookies' => true, 'use_trans_sid' => false, 'cache_limiter' => null, 'module_name' => 'files' ]

Magic properties

public string $remote_agent_hash

The remote user agent hash of the request that created the session.

public ICanBoogie\Logger $icanboogie_logger
public string $token

A token that can be used to prevent cross-site request forgeries.

ICanBoogie/ICanBoogie v2.3.1 API documentation generated by ApiGen