コード例 #1
0
ファイル: JSessionTest.php プロジェクト: N6REJ/joomla-cms
 /**
  * Test isNew
  *
  * @return void
  */
 public function testIsNew()
 {
     $this->object->set('session.counter', 1);
     $this->assertEquals(true, $this->object->isNew(), '$isNew should be true.');
 }
コード例 #2
0
 /**
  * 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'));
     }
 }