private function _initObjects() { // set up the custom encrypted session handler $session = new Session(); //$di->register($session); session_start(); // see if we need to lock our session $sessionLock = Config::get('session.lock'); if ($sessionLock == true) { $session->lock(); } // grab our input & filter $filter = new Filter(); $input = new Input($filter); session_set_cookie_params(3600, '/', $input->server('HTTP_HOST'), 1, true); //$di->register($input); $env = new Env($input); $env->check(); }
<?php namespace infrajs\layer\env; use infrajs\path\Path; use infrajs\event\Event; use infrajs\controller\Layer; use infrajs\config\Config; Config::get('controller'); Event::handler('Infrajs.oninit', function () { Env::init(); Layer::parsedAdd('envval'); }); Event::handler('layer.oncheck', function (&$layer) { Env::checkinit($layer); }, 'env:config,external'); Event::handler('layer.oncheck', function (&$layer) { Env::envtochild($layer); }, 'env:config,external'); Event::handler('layer.oncheck', function (&$layer) { Env::envframe($layer); }, 'env:config,external'); Event::handler('layer.oncheck', function (&$layer) { Env::envframe2($layer); }, 'env:config,external'); Event::handler('layer.oncheck', function (&$layer) { Env::envmytochild($layer); }, 'env:config,external'); Event::handler('layer.isshow', function (&$layer) { return Env::check($layer); }, 'env:counter,tpl,div,is');