/** * Test isNew * * @return void */ public function testIsNew() { $this->object->set('session.counter', 1); $this->assertEquals(true, $this->object->isNew(), '$isNew should be true.'); }
/** * Event listener for the `onAfterSessionStart` event. * * @param JSession $session Session object * * @return void * * @since __DEPLOY_VERSION__ */ public function afterSessionStart(JSession $session) { if ($session->isNew()) { $session->set('registry', new Registry('session')); } }