Advertisement
fruffl

Session Manager

Oct 15th, 2012
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 28.97 KB | None | 0 0
  1.     CLASS Manager
  2.     {
  3.         USE tField
  4.         {
  5.             tField_template__get as public __get;
  6.             tField_template__set as public __set;
  7.             tField_Explain as public debug;
  8.         }
  9.        
  10.         public function __construct()
  11.         {
  12.             $this
  13.             ->tField_define
  14.             (
  15.                 'SegmentBuilder', ['ILLI\Core\Session\Segment\Builder'],
  16.                 [
  17.                     iField::PROP_INIT       => new SegmentBuilder,
  18.                     iField::PROP_PRIVATE_SET    => TRUE,
  19.                     iField::PROP_PRIVATE_GET    => TRUE
  20.                 ],
  21.                 iField::DEBUG_CONTAINS
  22.             )
  23.             ->tField_define
  24.             (
  25.                 'CsrfBuilder', ['ILLI\Core\Session\Csrf\Builder'],
  26.                 [
  27.                     iField::PROP_INIT       => new CsrfTokenBuilder,
  28.                     iField::PROP_PRIVATE_SET    => TRUE,
  29.                     iField::PROP_PRIVATE_GET    => TRUE
  30.                 ],
  31.                 iField::DEBUG_CONTAINS
  32.             )
  33.             ->tField_define
  34.             (
  35.                 'Csrf', ['ILLI\Core\Session\Csrf\Token'],
  36.                 [
  37.                     iField::PROP_INIT       => NULL,
  38.                     iField::PROP_PRIVATE_SET    => TRUE,
  39.                     iField::PROP_PRIVATE_GET    => FALSE,
  40.                     iField::PROP_ON_GET     => function(array $data)
  41.                     {
  42.                         if(NULL === $data[iField::CALLBACK_PROP_CONTAINS])
  43.                         {
  44.                             $token = $this->tField_get('CsrfBuilder')->createInstance($this);;
  45.                             $this->tField_set('Csrf', $token);
  46.                             $data[iField::CALLBACK_PROP_CONTAINS] = $token;
  47.                         }
  48.                        
  49.                         return $data;
  50.                     }
  51.                 ],
  52.                 iField::DEBUG_CONTAINS
  53.             )
  54.             ->tField_define
  55.             (
  56.                 'Segments', ['ILLI\Core\Data\Collection'],
  57.                 [
  58.                     iField::PROP_INIT       => new Collection,
  59.                     iField::PROP_PRIVATE_SET    => TRUE,
  60.                     iField::PROP_PRIVATE_GET    => TRUE
  61.                 ],
  62.                 iField::DEBUG_CONTAINS
  63.             )
  64.             ->tField_define
  65.             (
  66.                 'Cookie', ['ILLI\Core\Web\Data\Response\Cookie'],
  67.                 [
  68.                     iField::PROP_INIT       => NULL,
  69.                     iField::PROP_PRIVATE_SET    => TRUE,
  70.                     iField::PROP_PRIVATE_GET    => FALSE,
  71.                     iField::PROP_ON_GET     => function(array $data)
  72.                     {
  73.                         if($data[iField::CALLBACK_PROP_CONTAINS] === NULL)
  74.                             $data[iField::CALLBACK_PROP_CONTAINS] = new Cookie;
  75.                        
  76.                         $Cookie = $data[iField::CALLBACK_PROP_CONTAINS];
  77.                         $cookie = session_get_cookie_params();
  78.                        
  79.                         $Cookie->name       = $this->tField_get('name');
  80.                         $Cookie->value      = $this->tField_get('id');
  81.                         $Cookie->path       = $cookie['path'];
  82.                         $Cookie->domain     = $cookie['domain'];
  83.                         $Cookie->secure     = $cookie['secure'];
  84.                         $Cookie->httpOnly   = $cookie['httponly'];
  85.                         $Cookie->lifetime   = $cookie['lifetime'];
  86.                        
  87.                         $data[iField::CALLBACK_PROP_CONTAINS] = $Cookie;
  88.                         $this->tField_set('Cookie', $Cookie);
  89.                         return $data;
  90.                     }
  91.                 ],
  92.                 iField::DEBUG_CONTAINS
  93.             )
  94.             ->tField_define
  95.             (
  96.                 'isStarted', ['boolean'],
  97.                 [
  98.                     iField::PROP_INIT       => session_id() !== '',
  99.                     iField::PROP_PRIVATE_SET    => TRUE,
  100.                     iField::PROP_PRIVATE_GET    => FALSE,
  101.                     iField::PROP_ON_GET     => function(array $data)
  102.                     {
  103.                         $data[iField::CALLBACK_PROP_CONTAINS] = (session_id() !== '');
  104.                         return $data;
  105.                     }
  106.                 ],
  107.                 iField::DEBUG_CONTAINS
  108.             )
  109.             ->tField_define
  110.             (
  111.                 'isActive', ['boolean'],
  112.                 [
  113.                     iField::PROP_INIT       => session_status() === PHP_SESSION_ACTIVE,
  114.                     iField::PROP_PRIVATE_SET    => TRUE,
  115.                     iField::PROP_PRIVATE_GET    => FALSE,
  116.                     iField::PROP_ON_GET     => function(array $data)
  117.                     {
  118.                         $data[iField::CALLBACK_PROP_CONTAINS] = (session_status() == PHP_SESSION_ACTIVE);
  119.                         return $data;
  120.                     }
  121.                 ],
  122.                 iField::DEBUG_CONTAINS
  123.             )
  124.             ->tField_define
  125.             (
  126.                 'status', ['integer'],
  127.                 [
  128.                     iField::PROP_INIT       => session_status(),
  129.                     iField::PROP_PRIVATE_SET    => TRUE,
  130.                     iField::PROP_PRIVATE_GET    => FALSE,
  131.                     iField::PROP_ON_GET     => function(array $data)
  132.                     {
  133.                         $data[iField::CALLBACK_PROP_CONTAINS] = session_status();
  134.                         return $data;
  135.                     }
  136.                 ],
  137.                 iField::DEBUG_CONTAINS
  138.             )
  139.             ->tField_define
  140.             (
  141.                 'id', ['string'],
  142.                 [
  143.                     iField::PROP_INIT       => session_id(),
  144.                     iField::PROP_PRIVATE_SET    => TRUE,
  145.                     iField::PROP_PRIVATE_GET    => FALSE,
  146.                     iField::PROP_ON_GET     => function(array $data)
  147.                     {
  148.                         $data[iField::CALLBACK_PROP_CONTAINS] = session_id();
  149.                         return $data;
  150.                     }
  151.                 ],
  152.                 iField::DEBUG_CONTAINS
  153.             )
  154.             ->tField_define
  155.             (
  156.                 'name', ['string'],
  157.                 [
  158.                     iField::PROP_INIT       => NULL,
  159.                     iField::PROP_PRIVATE_SET    => FALSE,
  160.                     iField::PROP_PRIVATE_GET    => FALSE,
  161.                     iField::PROP_ON_SET     => function(array $data)
  162.                     {
  163.                         session_name($data[iField::CALLBACK_PROP_NEW]);
  164.                         $data[iField::CALLBACK_PROP_NEW] = session_name();
  165.                        
  166.                         $this->tField_get('Cookie')->name = $data[iField::CALLBACK_PROP_NEW];
  167.                         return $data;
  168.                     },
  169.                     iField::PROP_ON_GET     => function(array $data)
  170.                     {
  171.                         $data[iField::CALLBACK_PROP_CONTAINS] = session_name();
  172.                         return $data;
  173.                     }
  174.                 ],
  175.                 iField::DEBUG_CONTAINS
  176.             )
  177.             ->tField_define
  178.             (
  179.                 'savePath', ['string'],
  180.                 [
  181.                     iField::PROP_INIT       => session_save_path(),
  182.                     iField::PROP_PRIVATE_SET    => FALSE,
  183.                     iField::PROP_PRIVATE_GET    => FALSE,
  184.                     iField::PROP_ON_SET     => function(array $data)
  185.                     {
  186.                         session_save_path($data[iField::CALLBACK_PROP_NEW]);
  187.                         return $data;
  188.                     },
  189.                     iField::PROP_ON_GET     => function(array $data)
  190.                     {
  191.                         $data[iField::CALLBACK_PROP_CONTAINS] = session_save_path();
  192.                         return $data;
  193.                     }
  194.                 ],
  195.                 iField::DEBUG_CONTAINS
  196.             )
  197.             ->tField_define
  198.             (
  199.                 'cacheExpire', ['integer'],
  200.                 [
  201.                     iField::PROP_INIT       => session_cache_expire(),
  202.                     iField::PROP_PRIVATE_SET    => FALSE,
  203.                     iField::PROP_PRIVATE_GET    => FALSE,
  204.                     iField::PROP_ON_SET     => function(array $data)
  205.                     {
  206.                         session_cache_expire($data[iField::CALLBACK_PROP_NEW]);
  207.                         return $data;
  208.                     },
  209.                     iField::PROP_ON_GET     => function(array $data)
  210.                     {
  211.                         $data[iField::CALLBACK_PROP_CONTAINS] = session_cache_expire();
  212.                         return $data;
  213.                     }
  214.                 ],
  215.                 iField::DEBUG_CONTAINS
  216.             )
  217.             ->tField_define
  218.             (
  219.                 'cacheLimiter', ['string'],
  220.                 [
  221.                     iField::PROP_INIT       => session_cache_limiter(),
  222.                     iField::PROP_PRIVATE_SET    => FALSE,
  223.                     iField::PROP_PRIVATE_GET    => FALSE,
  224.                     iField::PROP_ON_SET     => function(array $data)
  225.                     {
  226.                         session_cache_limiter($data[iField::CALLBACK_PROP_NEW]);
  227.                         return $data;
  228.                     },
  229.                     iField::PROP_ON_GET     => function(array $data)
  230.                     {
  231.                         $data[iField::CALLBACK_PROP_CONTAINS] = session_cache_limiter();
  232.                         return $data;
  233.                     }
  234.                 ],
  235.                 iField::DEBUG_CONTAINS
  236.             );
  237.         }
  238.        
  239.         public function getSegment($name)
  240.         {
  241.             if(FALSE === $this->isStarted)
  242.                 $this->start();
  243.        
  244.             if(FALSE === $this->tField_get('Segments')->offsetExists($name))
  245.                 $this->tField_get('Segments')->offsetSet($name, $this->tField_get('SegmentBuilder')->createInstance($name));
  246.        
  247.             return $this->tField_get('Segments')->offsetGet($name);
  248.         }
  249.        
  250.         public function regenerateId()
  251.         {
  252.             $result = session_regenerate_id(true);
  253.             if($result)
  254.                 $this->tField_get('Csrf')->Segment->regenerateToken();
  255.            
  256.             //$this->tField_set('id', $result);
  257.             return $result;
  258.         }
  259.        
  260.         public function start()
  261.         {
  262.             return session_start();
  263.         }
  264.        
  265.         public function clear()
  266.         {
  267.             return session_unset();
  268.         }
  269.        
  270.         public function commit()
  271.         {
  272.             return session_write_close();
  273.         }
  274.        
  275.         public function destroy()
  276.         {
  277.             $this->clear();
  278.             return session_destroy();
  279.         }
  280.     }
  281.  
  282.     CLASS Segment
  283.     {
  284.         USE tField
  285.         {
  286.             tField_template__set as public __set;
  287.             tField_template__get as public __get;
  288.         }
  289.        
  290.         public function __construct
  291.         (
  292.             $__name,
  293.             array & $__data     = [],
  294.             array & $__flash    = [],
  295.             $__created      = 0,
  296.             $__expire       = 0,
  297.             $__livetime     = NULL,
  298.             $__token        = NULL
  299.         )
  300.         {
  301.             $this->tField_define
  302.             (
  303.                 'name', ['string'],
  304.                 [
  305.                     iField::PROP_INIT       => $__name,
  306.                     iField::PROP_PRIVATE_SET    => TRUE,
  307.                     iField::PROP_PRIVATE_GET    => FALSE
  308.                 ],
  309.                 iField::DEBUG_CONTAINS
  310.             )
  311.             ->tField_define
  312.             (
  313.                 'Data', ['string'],
  314.                 [
  315.                     iField::PROP_INIT       => new FieldReferencedCollection($__data, iCollection::OPT_FIELD_CLEAR),
  316.                     iField::PROP_PRIVATE_SET    => TRUE,
  317.                     iField::PROP_PRIVATE_GET    => FALSE
  318.                 ],
  319.                 iField::DEBUG_CONTAINS
  320.             )
  321.             ->tField_define
  322.             (
  323.                 'Flash', ['string'],
  324.                 [
  325.                     iField::PROP_INIT       => new FieldReferencedCollection($__flash, iCollection::OPT_FIELD_CLEAR | iCollection::OPT_FIELD_FLASH),
  326.                     iField::PROP_PRIVATE_SET    => TRUE,
  327.                     iField::PROP_PRIVATE_GET    => FALSE
  328.                 ],
  329.                 iField::DEBUG_CONTAINS
  330.             )
  331.             ->tField_define
  332.             (
  333.                 'expire', ['integer'],
  334.                 [
  335.                     iField::PROP_INIT       => $__expire,
  336.                     iField::PROP_PRIVATE_SET    => FALSE,
  337.                     iField::PROP_PRIVATE_GET    => FALSE,
  338.                     iField::PROP_ON_SET     => function(array $data)
  339.                     {
  340.                         $value = $data[iField::CALLBACK_PROP_NEW];
  341.                         if(FALSE === is_numeric($value))
  342.                             $value = strtotime($value);
  343.                            
  344.                         $value = intval($value);
  345.                         $data[iField::CALLBACK_PROP_CONTAINS] = $value;
  346.                         return $data;
  347.                     }
  348.                 ],
  349.                 iField::DEBUG_CONTAINS
  350.             )
  351.             ->tField_define
  352.             (
  353.                 'time', ['integer'],
  354.                 [
  355.                     iField::PROP_INIT       => time(),
  356.                     iField::PROP_PRIVATE_SET    => FALSE,
  357.                     iField::PROP_PRIVATE_GET    => FALSE
  358.                 ],
  359.                 iField::DEBUG_CONTAINS
  360.             )
  361.             ->tField_define
  362.             (
  363.                 'created', ['integer'],
  364.                 [
  365.                     iField::PROP_INIT       => $__created !== NULL ? $__created : time(),
  366.                     iField::PROP_PRIVATE_SET    => FALSE,
  367.                     iField::PROP_PRIVATE_GET    => FALSE
  368.                 ],
  369.                 iField::DEBUG_CONTAINS
  370.             )
  371.             ->tField_define
  372.             (
  373.                 'lifetime', ['integer'],
  374.                 [
  375.                     iField::PROP_INIT       => $__livetime,
  376.                     iField::PROP_PRIVATE_SET    => FALSE,
  377.                     iField::PROP_PRIVATE_GET    => FALSE,
  378.                     iField::PROP_SYNCH      =>
  379.                     [
  380.                         'expire'        => function($expire)
  381.                         {
  382.                             $expire = $this->tField_get('created') + $expire;
  383.                             return $expire;
  384.                         }
  385.                     ]
  386.                 ],
  387.                 iField::DEBUG_CONTAINS
  388.             )
  389.             ->tField_define
  390.             (
  391.                 'isLiving', ['boolean'],
  392.                 [
  393.                     iField::PROP_INIT       => $__expire === 0 || $__expire > time(),
  394.                     iField::PROP_PRIVATE_SET    => FALSE,
  395.                     iField::PROP_PRIVATE_GET    => FALSE,
  396.                     iField::PROP_ON_GET     => function(array $data)
  397.                     {
  398.                         $data[iField::CALLBACK_PROP_CONTAINS] =
  399.                             $this->tField_get('expire') === 0 || $this->tField_get('expire') > time();
  400.                            
  401.                         return $data;
  402.                     }
  403.                 ],
  404.                 iField::DEBUG_CONTAINS
  405.             )
  406.             ->tField_define
  407.             (
  408.                 'token', ['string'],
  409.                 [
  410.                     iField::PROP_INIT       => $__token !== NULL ? $__token : uniqid(mt_rand(), true),
  411.                     iField::PROP_PRIVATE_SET    => TRUE,
  412.                     iField::PROP_PRIVATE_GET    => FALSE
  413.                 ],
  414.                 iField::DEBUG_CONTAINS
  415.             );
  416.         }
  417.        
  418.         public function &toReference()
  419.         {
  420.             $data   =& $this->tField_get('Data')->toReference();
  421.             $flash  =& $this->tField_get('Flash')->toReference();
  422.             $result =
  423.             [
  424.                 'data'      => &$data,
  425.                 'flash'     => &$flash,
  426.                 'isLiving'  => &self::$__tField_PropContains[$this->__tField_Hash]['isLiving'],
  427.                 'expire'    => &self::$__tField_PropContains[$this->__tField_Hash]['expire'],
  428.                 'created'   => &self::$__tField_PropContains[$this->__tField_Hash]['created'],
  429.                 'lifetime'  => &self::$__tField_PropContains[$this->__tField_Hash]['lifetime'],
  430.                 'time'      => &self::$__tField_PropContains[$this->__tField_Hash]['time'],
  431.                 'token'     => &self::$__tField_PropContains[$this->__tField_Hash]['token'],
  432.             ];
  433.            
  434.             return $result;
  435.         }
  436.        
  437.         public function regenerateCreated()
  438.         {
  439.             $this->tField_set('created', time());
  440.             return $this;
  441.         }
  442.        
  443.         public function clear()
  444.         {
  445.             $this->tField_get('Data')->clear();
  446.             $this->tField_get('Flash')->clear();
  447.             return $this;
  448.         }
  449.     }
  450.  
  451.     CLASS Builder
  452.     {
  453.         protected $__namespace = NULL;
  454.        
  455.         public function __construct()
  456.         {
  457.             $this->__namespace = get_called_class();
  458.         }
  459.        
  460.         public function getNamespace()
  461.         {
  462.             return $this->__namespace;
  463.         }
  464.        
  465.         public function createInstance($name)
  466.         {
  467.             $who = $this->__namespace;
  468.            
  469.             //unset($_SESSION);
  470.            
  471.             $segment = new Segment($name);
  472.            
  473.             $what =
  474.             [
  475.                 'data'      => [],
  476.                 'flash'     => [],
  477.                 'created'   => time(),
  478.                 'expire'    => 0,
  479.                 'isLiving'  => TRUE,
  480.                 'lifetime'  => NULL,
  481.                 'token'     => NULL,
  482.             ];
  483.            
  484.             if(FALSE === isset($_SESSION[$who]))
  485.                 $_SESSION[$who] = [];
  486.                
  487.             if(FALSE === isset($_SESSION[$who][$name]))
  488.             {
  489.                 $_SESSION[$who][$name] = $what;
  490.                 return new Segment
  491.                 (
  492.                     $name
  493.                 );
  494.             }
  495.             else
  496.             {
  497.                 $session = new Segment
  498.                 (
  499.                     $name,
  500.                     $_SESSION[$who][$name]['data'],
  501.                     $_SESSION[$who][$name]['flash'],
  502.                     $_SESSION[$who][$name]['created'],
  503.                     $_SESSION[$who][$name]['expire'],
  504.                     $_SESSION[$who][$name]['lifetime'],
  505.                     $_SESSION[$who][$name]['token']
  506.                 );
  507.                 $_SESSION[$who][$name] = & $session->toReference();
  508.                
  509.                 return $session;
  510.             }
  511.         }
  512.     }
  513.  
  514.     $s = new \ILLI\Core\Session\Manager;
  515.     $s->start();
  516.     $s->name = 'foobar';
  517.     $s->Csrf; // init on 1st get
  518.     $s->getSegment('User')->Data->offsetSet('run_once', 'foozzy');
  519.     $s->getSegment('User')->lifetime = 100;
  520.     var_dump($_SESSION);
  521.     //$s->destroy();
  522.     var_dump($_SESSION);
  523.     $baz = 'lazy';
  524.     $_SESSION['bar'] = &$baz;
  525.     var_dump($_SESSION);
  526.     $baz = 'lose';
  527.     var_dump($_SESSION);
  528.     //$s->save();
  529.     var_dump($s);
  530. ?>
  531. array(2) {
  532.   ["ILLI\Core\Session\Segment\Builder"]=>
  533.   array(2) {
  534.     ["ILLI\Session\Csrf\Token"]=>
  535.     array(8) {
  536.       ["data"]=>
  537.       &array(1) {
  538.         ["token"]=>
  539.         string(33) "1962400955507c4a4b1bcfb8.21448942"
  540.       }
  541.       ["flash"]=>
  542.       &array(0) {
  543.       }
  544.       ["isLiving"]=>
  545.       &bool(true)
  546.       ["expire"]=>
  547.       &int(0)
  548.       ["created"]=>
  549.       &int(1350322761)
  550.       ["lifetime"]=>
  551.       &NULL
  552.       ["time"]=>
  553.       &int(1350323281)
  554.       ["token"]=>
  555.       &string(32) "821674112507c4bbeb60830.43460789"
  556.     }
  557.     ["User"]=>
  558.     array(8) {
  559.       ["data"]=>
  560.       &array(1) {
  561.         ["run_once"]=>
  562.         string(6) "foozzy"
  563.       }
  564.       ["flash"]=>
  565.       &array(0) {
  566.       }
  567.       ["isLiving"]=>
  568.       &bool(false)
  569.       ["expire"]=>
  570.       &int(1350322861)
  571.       ["created"]=>
  572.       &int(1350322761)
  573.       ["lifetime"]=>
  574.       &int(100)
  575.       ["time"]=>
  576.       &int(1350323281)
  577.       ["token"]=>
  578.       &string(33) "2088807688507c4bbeb6abe2.90872036"
  579.     }
  580.   }
  581.   ["bar"]=>
  582.   string(4) "lose"
  583. }
  584. object(ILLI\Core\Session\Manager)#14 (4) {
  585.  ["__tField":protected]=>
  586.   array(13) {
  587.     ["SegmentBuilder"]=>
  588.     array(1) {
  589.       ["contains"]=>
  590.       &object(ILLI\Core\Session\Segment\Builder)#18 (1) {
  591.        ["__namespace":protected]=>
  592.         string(33) "ILLI\Core\Session\Segment\Builder"
  593.       }
  594.     }
  595.     ["CsrfBuilder"]=>
  596.     array(1) {
  597.       ["contains"]=>
  598.       &object(ILLI\Core\Session\Csrf\Builder)#23 (0) {
  599.      }
  600.     }
  601.     ["Csrf"]=>
  602.     array(1) {
  603.       ["contains"]=>
  604.       &object(ILLI\Core\Session\Csrf\Token)#72 (4) {
  605.        ["__tField":protected]=>
  606.         array(1) {
  607.           ["Segment"]=>
  608.           array(1) {
  609.             ["contains"]=>
  610.             &object(ILLI\Core\Session\Segment\Segment)#100 (4) {
  611.              ["__tField":protected]=>
  612.               array(9) {
  613.                 ["name"]=>
  614.                 array(1) {
  615.                   ["contains"]=>
  616.                   &string(23) "ILLI\Session\Csrf\Token"
  617.                 }
  618.                 ["Data"]=>
  619.                 array(1) {
  620.                   ["contains"]=>
  621.                   &object(ILLI\Core\Data\FieldReferencedCollection)#103 (7) {
  622.                    ["__flag":protected]=>
  623.                     int(162)
  624.                     ["__data":protected]=>
  625.                     &array(1) {
  626.                       ["token"]=>
  627.                       string(33) "1962400955507c4a4b1bcfb8.21448942"
  628.                     }
  629.                     ["__tCollectionField_flag":"ILLI\Core\Data\FieldCollection":private]=>
  630.                     int(162)
  631.                     ["__tField":protected]=>
  632.                     array(1) {
  633.                       ["token"]=>
  634.                       array(2) {
  635.                         ["contains"]=>
  636.                         &string(33) "1962400955507c4a4b1bcfb8.21448942"
  637.                         ["init"]=>
  638.                         &string(33) "1962400955507c4a4b1bcfb8.21448942"
  639.                       }
  640.                     }
  641.                     ["__tField_LockRegistration":"ILLI\Core\Data\FieldCollection":private]=>
  642.                     bool(false)
  643.                     ["__tField_LockAllFields":"ILLI\Core\Data\FieldCollection":private]=>
  644.                     bool(false)
  645.                     ["__tField_Hash":"ILLI\Core\Data\FieldCollection":private]=>
  646.                     string(32) "00000000088df5020000000039748b74"
  647.                   }
  648.                 }
  649.                 ["Flash"]=>
  650.                 array(1) {
  651.                   ["contains"]=>
  652.                   &object(ILLI\Core\Data\FieldReferencedCollection)#109 (7) {
  653.                    ["__flag":protected]=>
  654.                     int(226)
  655.                     ["__data":protected]=>
  656.                     &array(0) {
  657.                     }
  658.                     ["__tCollectionField_flag":"ILLI\Core\Data\FieldCollection":private]=>
  659.                     int(226)
  660.                     ["__tField":protected]=>
  661.                     array(0) {
  662.                     }
  663.                     ["__tField_LockRegistration":"ILLI\Core\Data\FieldCollection":private]=>
  664.                     bool(false)
  665.                     ["__tField_LockAllFields":"ILLI\Core\Data\FieldCollection":private]=>
  666.                     bool(false)
  667.                     ["__tField_Hash":"ILLI\Core\Data\FieldCollection":private]=>
  668.                     NULL
  669.                   }
  670.                 }
  671.                 ["expire"]=>
  672.                 array(1) {
  673.                   ["contains"]=>
  674.                   &int(0)
  675.                 }
  676.                 ["time"]=>
  677.                 array(1) {
  678.                   ["contains"]=>
  679.                   &int(1350323281)
  680.                 }
  681.                 ["created"]=>
  682.                 array(1) {
  683.                   ["contains"]=>
  684.                   &int(1350322761)
  685.                 }
  686.                 ["lifetime"]=>
  687.                 array(1) {
  688.                   ["contains"]=>
  689.                   &NULL
  690.                 }
  691.                 ["isLiving"]=>
  692.                 array(1) {
  693.                   ["contains"]=>
  694.                   &bool(true)
  695.                 }
  696.                 ["token"]=>
  697.                 array(1) {
  698.                   ["contains"]=>
  699.                   &string(32) "821674112507c4bbeb60830.43460789"
  700.                 }
  701.               }
  702.               ["__tField_LockRegistration":"ILLI\Core\Session\Segment\Segment":private]=>
  703.               bool(false)
  704.               ["__tField_LockAllFields":"ILLI\Core\Session\Segment\Segment":private]=>
  705.               bool(false)
  706.               ["__tField_Hash":"ILLI\Core\Session\Segment\Segment":private]=>
  707.               string(32) "00000000088df5010000000039748b74"
  708.             }
  709.           }
  710.         }
  711.         ["__tField_LockRegistration":"ILLI\Core\Session\Csrf\Token":private]=>
  712.         bool(false)
  713.         ["__tField_LockAllFields":"ILLI\Core\Session\Csrf\Token":private]=>
  714.         bool(false)
  715.         ["__tField_Hash":"ILLI\Core\Session\Csrf\Token":private]=>
  716.         string(32) "00000000088df52d0000000039748b74"
  717.       }
  718.     }
  719.     ["Segments"]=>
  720.     array(1) {
  721.       ["contains"]=>
  722.       &object(ILLI\Core\Data\Collection)#30 (1) {
  723.        ["__data":protected]=>
  724.         array(2) {
  725.           ["ILLI\Session\Csrf\Token"]=>
  726.           object(ILLI\Core\Session\Segment\Segment)#100 (4) {
  727.            ["__tField":protected]=>
  728.             array(9) {
  729.               ["name"]=>
  730.               array(1) {
  731.                 ["contains"]=>
  732.                 &string(23) "ILLI\Session\Csrf\Token"
  733.               }
  734.               ["Data"]=>
  735.               array(1) {
  736.                 ["contains"]=>
  737.                 &object(ILLI\Core\Data\FieldReferencedCollection)#103 (7) {
  738.                  ["__flag":protected]=>
  739.                   int(162)
  740.                   ["__data":protected]=>
  741.                   &array(1) {
  742.                     ["token"]=>
  743.                     string(33) "1962400955507c4a4b1bcfb8.21448942"
  744.                   }
  745.                   ["__tCollectionField_flag":"ILLI\Core\Data\FieldCollection":private]=>
  746.                   int(162)
  747.                   ["__tField":protected]=>
  748.                   array(1) {
  749.                     ["token"]=>
  750.                     array(2) {
  751.                       ["contains"]=>
  752.                       &string(33) "1962400955507c4a4b1bcfb8.21448942"
  753.                       ["init"]=>
  754.                       &string(33) "1962400955507c4a4b1bcfb8.21448942"
  755.                     }
  756.                   }
  757.                   ["__tField_LockRegistration":"ILLI\Core\Data\FieldCollection":private]=>
  758.                   bool(false)
  759.                   ["__tField_LockAllFields":"ILLI\Core\Data\FieldCollection":private]=>
  760.                   bool(false)
  761.                   ["__tField_Hash":"ILLI\Core\Data\FieldCollection":private]=>
  762.                   string(32) "00000000088df5020000000039748b74"
  763.                 }
  764.               }
  765.               ["Flash"]=>
  766.               array(1) {
  767.                 ["contains"]=>
  768.                 &object(ILLI\Core\Data\FieldReferencedCollection)#109 (7) {
  769.                  ["__flag":protected]=>
  770.                   int(226)
  771.                   ["__data":protected]=>
  772.                   &array(0) {
  773.                   }
  774.                   ["__tCollectionField_flag":"ILLI\Core\Data\FieldCollection":private]=>
  775.                   int(226)
  776.                   ["__tField":protected]=>
  777.                   array(0) {
  778.                   }
  779.                   ["__tField_LockRegistration":"ILLI\Core\Data\FieldCollection":private]=>
  780.                   bool(false)
  781.                   ["__tField_LockAllFields":"ILLI\Core\Data\FieldCollection":private]=>
  782.                   bool(false)
  783.                   ["__tField_Hash":"ILLI\Core\Data\FieldCollection":private]=>
  784.                   NULL
  785.                 }
  786.               }
  787.               ["expire"]=>
  788.               array(1) {
  789.                 ["contains"]=>
  790.                 &int(0)
  791.               }
  792.               ["time"]=>
  793.               array(1) {
  794.                 ["contains"]=>
  795.                 &int(1350323281)
  796.               }
  797.               ["created"]=>
  798.               array(1) {
  799.                 ["contains"]=>
  800.                 &int(1350322761)
  801.               }
  802.               ["lifetime"]=>
  803.               array(1) {
  804.                 ["contains"]=>
  805.                 &NULL
  806.               }
  807.               ["isLiving"]=>
  808.               array(1) {
  809.                 ["contains"]=>
  810.                 &bool(true)
  811.               }
  812.               ["token"]=>
  813.               array(1) {
  814.                 ["contains"]=>
  815.                 &string(32) "821674112507c4bbeb60830.43460789"
  816.               }
  817.             }
  818.             ["__tField_LockRegistration":"ILLI\Core\Session\Segment\Segment":private]=>
  819.             bool(false)
  820.             ["__tField_LockAllFields":"ILLI\Core\Session\Segment\Segment":private]=>
  821.             bool(false)
  822.             ["__tField_Hash":"ILLI\Core\Session\Segment\Segment":private]=>
  823.             string(32) "00000000088df5010000000039748b74"
  824.           }
  825.           ["User"]=>
  826.           object(ILLI\Core\Session\Segment\Segment)#148 (4) {
  827.            ["__tField":protected]=>
  828.             array(9) {
  829.               ["name"]=>
  830.               array(1) {
  831.                 ["contains"]=>
  832.                 &string(4) "User"
  833.               }
  834.               ["Data"]=>
  835.               array(1) {
  836.                 ["contains"]=>
  837.                 &object(ILLI\Core\Data\FieldReferencedCollection)#151 (7) {
  838.                  ["__flag":protected]=>
  839.                   int(162)
  840.                   ["__data":protected]=>
  841.                   &array(1) {
  842.                     ["run_once"]=>
  843.                     string(6) "foozzy"
  844.                   }
  845.                   ["__tCollectionField_flag":"ILLI\Core\Data\FieldCollection":private]=>
  846.                   int(162)
  847.                   ["__tField":protected]=>
  848.                   array(1) {
  849.                     ["runOnce"]=>
  850.                     array(2) {
  851.                       ["contains"]=>
  852.                       &string(6) "foozzy"
  853.                       ["init"]=>
  854.                       &string(6) "foozzy"
  855.                     }
  856.                   }
  857.                   ["__tField_LockRegistration":"ILLI\Core\Data\FieldCollection":private]=>
  858.                   bool(false)
  859.                   ["__tField_LockAllFields":"ILLI\Core\Data\FieldCollection":private]=>
  860.                   bool(false)
  861.                   ["__tField_Hash":"ILLI\Core\Data\FieldCollection":private]=>
  862.                   string(32) "00000000088df5f20000000039748b74"
  863.                 }
  864.               }
  865.               ["Flash"]=>
  866.               array(1) {
  867.                 ["contains"]=>
  868.                 &object(ILLI\Core\Data\FieldReferencedCollection)#157 (7) {
  869.                  ["__flag":protected]=>
  870.                   int(226)
  871.                   ["__data":protected]=>
  872.                   &array(0) {
  873.                   }
  874.                   ["__tCollectionField_flag":"ILLI\Core\Data\FieldCollection":private]=>
  875.                   int(226)
  876.                   ["__tField":protected]=>
  877.                   array(0) {
  878.                   }
  879.                   ["__tField_LockRegistration":"ILLI\Core\Data\FieldCollection":private]=>
  880.                   bool(false)
  881.                   ["__tField_LockAllFields":"ILLI\Core\Data\FieldCollection":private]=>
  882.                   bool(false)
  883.                   ["__tField_Hash":"ILLI\Core\Data\FieldCollection":private]=>
  884.                   NULL
  885.                 }
  886.               }
  887.               ["expire"]=>
  888.               array(1) {
  889.                 ["contains"]=>
  890.                 &int(1350322861)
  891.               }
  892.               ["time"]=>
  893.               array(1) {
  894.                 ["contains"]=>
  895.                 &int(1350323281)
  896.               }
  897.               ["created"]=>
  898.               array(1) {
  899.                 ["contains"]=>
  900.                 &int(1350322761)
  901.               }
  902.               ["lifetime"]=>
  903.               array(1) {
  904.                 ["contains"]=>
  905.                 &int(100)
  906.               }
  907.               ["isLiving"]=>
  908.               array(1) {
  909.                 ["contains"]=>
  910.                 &bool(false)
  911.               }
  912.               ["token"]=>
  913.               array(1) {
  914.                 ["contains"]=>
  915.                 &string(33) "2088807688507c4bbeb6abe2.90872036"
  916.               }
  917.             }
  918.             ["__tField_LockRegistration":"ILLI\Core\Session\Segment\Segment":private]=>
  919.             bool(false)
  920.             ["__tField_LockAllFields":"ILLI\Core\Session\Segment\Segment":private]=>
  921.             bool(false)
  922.             ["__tField_Hash":"ILLI\Core\Session\Segment\Segment":private]=>
  923.             string(32) "00000000088df5f10000000039748b74"
  924.           }
  925.         }
  926.       }
  927.     }
  928.     ["Cookie"]=>
  929.     array(1) {
  930.       ["contains"]=>
  931.       &object(ILLI\Core\Web\Data\Response\Cookie)#53 (4) {
  932.        ["__tField":protected]=>
  933.         array(8) {
  934.           ["name"]=>
  935.           array(1) {
  936.             ["contains"]=>
  937.             &string(6) "foobar"
  938.           }
  939.           ["value"]=>
  940.           array(1) {
  941.             ["contains"]=>
  942.             &string(26) "as3lfvo965hnria54d4ps4mi31"
  943.           }
  944.           ["expire"]=>
  945.           array(1) {
  946.             ["contains"]=>
  947.             &int(1350323281)
  948.           }
  949.           ["lifetime"]=>
  950.           array(1) {
  951.             ["contains"]=>
  952.             &int(0)
  953.           }
  954.           ["path"]=>
  955.           array(1) {
  956.             ["contains"]=>
  957.             &string(1) "/"
  958.           }
  959.           ["domain"]=>
  960.           array(1) {
  961.             ["contains"]=>
  962.             &string(0) ""
  963.           }
  964.           ["secure"]=>
  965.           array(1) {
  966.             ["contains"]=>
  967.             &bool(false)
  968.           }
  969.           ["httpOnly"]=>
  970.           array(1) {
  971.             ["contains"]=>
  972.             &bool(false)
  973.           }
  974.         }
  975.         ["__tField_LockRegistration":"ILLI\Core\Web\Data\Response\Cookie":private]=>
  976.         bool(false)
  977.         ["__tField_LockAllFields":"ILLI\Core\Web\Data\Response\Cookie":private]=>
  978.         bool(false)
  979.         ["__tField_Hash":"ILLI\Core\Web\Data\Response\Cookie":private]=>
  980.         string(32) "00000000088df5500000000039748b74"
  981.       }
  982.     }
  983.     ["isStarted"]=>
  984.     array(1) {
  985.       ["contains"]=>
  986.       &bool(false)
  987.     }
  988.     ["isActive"]=>
  989.     array(1) {
  990.       ["contains"]=>
  991.       &bool(false)
  992.     }
  993.     ["status"]=>
  994.     array(1) {
  995.       ["contains"]=>
  996.       &int(1)
  997.     }
  998.     ["id"]=>
  999.     array(1) {
  1000.       ["contains"]=>
  1001.       &string(0) ""
  1002.     }
  1003.     ["name"]=>
  1004.     array(1) {
  1005.       ["contains"]=>
  1006.       &string(6) "foobar"
  1007.     }
  1008.     ["savePath"]=>
  1009.     array(1) {
  1010.       ["contains"]=>
  1011.       &string(34) "/var/www/clients/client5/web22/tmp"
  1012.     }
  1013.     ["cacheExpire"]=>
  1014.     array(1) {
  1015.       ["contains"]=>
  1016.       &int(180)
  1017.     }
  1018.     ["cacheLimiter"]=>
  1019.     array(1) {
  1020.       ["contains"]=>
  1021.       &string(7) "nocache"
  1022.     }
  1023.   }
  1024.   ["__tField_LockRegistration":"ILLI\Core\Session\Manager":private]=>
  1025.   bool(false)
  1026.   ["__tField_LockAllFields":"ILLI\Core\Session\Manager":private]=>
  1027.   bool(false)
  1028.   ["__tField_Hash":"ILLI\Core\Session\Manager":private]=>
  1029.   string(32) "00000000088df56b0000000039748b74"
  1030. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement