Hubert uses zend-session as session container.


At first you have to extend the configuration of composer:

    "require": {
        "falkm/hubert-session": "1.*"


Afterwards you have to extend the configuration of Hubert or create a new config/ file. In the following example we define for instance how long the sessin is valid in seconds and if the session must be validated for security reasons.

return array(
    "factories" => array(
        "session" => array(hubert\extension\session\factory::class, 'get')
    "config" => array(
        "session" => array(
            'remember_me_seconds'   => 1800,
            'validate_user_agend'   => false,
            'validate_remote_addr'  => false


 hubert()->session()->name = "name without namespace";
 hubert()->session('user')->name = "hubert (name at namespace 'user')";
 echo hubert()->session('user')->name;

You can see in the example that on a session call you can define a namespace for the variables. After that you can assign call values.