当前位置: 首页>>代码示例>>PHP>>正文


PHP ChamiloSession::setSession方法代码示例

本文整理汇总了PHP中ChamiloSession::setSession方法的典型用法代码示例。如果您正苦于以下问题:PHP ChamiloSession::setSession方法的具体用法?PHP ChamiloSession::setSession怎么用?PHP ChamiloSession::setSession使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ChamiloSession的用法示例。


在下文中一共展示了ChamiloSession::setSession方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onLogoutSuccess

 /**
  * @param Request $request
  * @return null|RedirectResponse
  */
 public function onLogoutSuccess(Request $request)
 {
     $session = $request->getSession();
     \ChamiloSession::setSession($session);
     // Chamilo logout
     $userId = api_get_user_id();
     \Online::logout($userId, false);
     $login = $this->router->generate('index');
     $response = new RedirectResponse($login);
     return $response;
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:15,代码来源:LogoutSuccessHandler.php

示例2: onSecuritySwitchUser

 /**
  * Fired on switch user, you can remove attributes or whatever you want here.
  * @param SwitchUserEvent $event
  */
 public function onSecuritySwitchUser(SwitchUserEvent $event)
 {
     /** @var \Entity\User $user */
     $user = $event->getTargetUser();
     /*var_dump($user );
       var_dump($event->getRequest()->getUser());
       */
     $request = $event->getRequest();
     $session = $request->getSession();
     \ChamiloSession::setSession($session);
     $session = $event->getRequest()->getSession();
     //$session->remove('partThatShouldNotCarryOver');
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:17,代码来源:LoginListener.php

示例3: createApplication

 /**
  * @return \Symfony\Component\HttpKernel\HttpKernel
  */
 public function createApplication()
 {
     // do not use require_once
     $app = (require __DIR__ . '/../../main/inc/global.inc.php');
     $app['debug'] = true;
     $app['session.test'] = true;
     $app['exception_handler']->disable();
     // Setting session obj for old libraries
     \ChamiloSession::setSession($app['session']);
     \UserManager::setEntityManager($app['orm.em']);
     //$app['monolog'] = $this->getMock('Monolog\Logger');
     return $app;
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:16,代码来源:BaseWebTestCase.php

示例4:

     $app->abort(500, "data/temp folder must be writable.");
 }
 // Checking that configuration is loaded
 if (!isset($app['configuration'])) {
     $app->abort(500, '$configuration array must be set in the configuration.php file.');
 }
 $configuration = $app['configuration'];
 // Check if root_web exists
 if (!isset($configuration['root_web'])) {
     $app->abort(500, '$configuration[root_web] must be set in the configuration.php file.');
 }
 // Starting the session for more info see: http://silex.sensiolabs.org/doc/providers/session.html
 $session = $request->getSession();
 $session->start();
 // Setting session obj
 Session::setSession($session);
 UserManager::setEntityManager($app['orm.em']);
 /** @var ChamiloLMS\Component\DataFilesystem\DataFilesystem $filesystem */
 $filesystem = $app['chamilo.filesystem'];
 if ($app['debug']) {
     // Creates data/temp folders for every request if debug is on.
     $filesystem->createFolders($app['temp.paths']->folders);
 }
 // If Assetic is enabled copy folders from theme inside "web/"
 if ($app['assetic.auto_dump_assets']) {
     $filesystem->copyFolders($app['temp.paths']->copyFolders);
 }
 // Check and modify the date of user in the track.e.online table
 Online::loginCheck(api_get_user_id());
 // Setting access_url id (multiple url feature)
 if (api_get_multiple_access_url()) {
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:global.inc.php


注:本文中的ChamiloSession::setSession方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。