ice framework documentation ice doc v1.6.2
Class Ice

Session

Methods
  • __construct() : void
    Session constructor. Start the session.
  • start() : bool
    Start the session.
  • isStarted(bool $autoStart) : bool
    Check whether the session was started.
  • getId() : string
    Get session id.
  • regenerate() : bool
    Regenerate session id.
  • destroy() : bool
    Destroy the session.
  • has(string $key) : bool
    Check whether session has the key.
  • get(string $key, variable $defaultValue, bool $required) : void
    Retrieve a single key from the session.
  • set(string $key, variable $value) : void
    Assigns a value to the specified session key.
  • remove(string $key) : void
    Remove session key.
  • getData() : array
    Fetch all data.
Methods Details
  • public function __construct()

    Session constructor. Start the session.
  • public function start()

    Start the session.
  • public function isStarted(bool $autoStart)

    Check whether the session was started.
  • public function getId()

    Get session id.
  • public function regenerate()

    Regenerate session id.
  • public function destroy()

    Destroy the session.
  • public function has(string $key)

    Check whether session has the key.
    No support for passing variables by reference yet zephir/issues/203
  • public function get(string $key, variable $defaultValue, bool $required)

    Retrieve a single key from the session.
  • public function set(string $key, variable $value)

    Assigns a value to the specified session key.
  • public function remove(string $key)

    Remove session key.
  • public function getData()

    Fetch all data.