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


PHP Http\Session类代码示例

本文整理汇总了PHP中Nette\Http\Session的典型用法代码示例。如果您正苦于以下问题:PHP Session类的具体用法?PHP Session怎么用?PHP Session使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: _before

 protected function _before()
 {
     $this->session = new \Nette\Http\Session(new \Nette\Http\Request(new \Nette\Http\UrlScript()), new \Nette\Http\Response());
     $this->session = new \Kdyby\FakeSession\Session($this->session);
     $this->session->start();
     $this->wizard = new Wizard($this->session);
 }
开发者ID:webchemistry,项目名称:forms-wizard,代码行数:7,代码来源:WizardTest.php

示例2: __construct

 /**
  * @param \Nette\ComponentModel\IContainer $ajaxDir
  * @param string $ajaxPath
  * @param \Nette\Http\Session $session
  */
 public function __construct($ajaxDir, $ajaxPath, Session $session)
 {
     parent::__construct();
     $this->ajaxDir = $ajaxDir;
     $this->ajaxPath = $ajaxPath;
     $this->sessionSection = $session->getSection('ajaxUploader-' . $this->getName());
 }
开发者ID:venne,项目名称:files,代码行数:12,代码来源:AjaxFileUploaderControl.php

示例3: __construct

 /**
  * @param PresenterFactory $presenterFactory
  * @param BaseRepository $roleRepository
  * @param Session $session
  */
 public function __construct(PresenterFactory $presenterFactory, BaseRepository $roleRepository, Session $session, Callback $checkConnection)
 {
     $this->presenterFactory = $presenterFactory;
     $this->roleRepository = $roleRepository;
     $this->session = $session->getSection(self::SESSION_SECTION);
     $this->checkConnection = $checkConnection;
 }
开发者ID:svobodni,项目名称:web,代码行数:12,代码来源:AuthorizatorFactory.php

示例4: __construct

 public function __construct(EntityManager $entityManager, Session $session, AdministrationManager $administrationManager)
 {
     $this->roleRepository = $entityManager->getRepository(Role::class);
     $this->permissionRepository = $entityManager->getRepository(Permission::class);
     $this->session = $session->getSection(self::SESSION_SECTION);
     $this->administrationManager = $administrationManager;
 }
开发者ID:venne,项目名称:venne,代码行数:7,代码来源:AuthorizatorFactory.php

示例5: __construct

 public function __construct(Kdyby\Doctrine\EntityManager $em, Zax\Utils\AppDir $appDir, Nette\Http\Session $session)
 {
     $this->em = $em;
     $this->schemaTool = new Doctrine\ORM\Tools\SchemaTool($this->em);
     $cacheStorage = new Nette\Caching\Storages\FileStorage($appDir . '/modules/Install/components/Install/installSchema');
     $this->cache = new Nette\Caching\Cache($cacheStorage);
     $this->sessionSection = $session->getSection('ZaxCMS.DatabaseGenerator');
 }
开发者ID:zaxxx,项目名称:zaxcms,代码行数:8,代码来源:DatabaseGenerator.php

示例6: __construct

 public function __construct(\Nette\Http\Session $session, \Fabian\Linkedin\Configuration $config)
 {
     $this->session = $session->getSection('linkedin');
     if (isset($this->session->access_token)) {
         $this->accessToken = $this->session->access_token;
     }
     $this->config = $config;
 }
开发者ID:lukdanek,项目名称:linkedin-nette,代码行数:8,代码来源:Linkedin.php

示例7: __construct

 /**
  * @param string  $defaultLang
  * @param ITranslatorStorage $translatorStorage
  * @param Nette\Http\Session $session
  * @param Nette\Application\Application $application
  */
 public function __construct($defaultLang, ITranslatorStorage $translatorStorage, Nette\Http\Session $session, Nette\Application\Application $application)
 {
     $this->setDefaultLang($defaultLang);
     $this->translatorStorage = $translatorStorage;
     $session->start();
     $this->session = $session;
     $this->application = $application;
 }
开发者ID:vladahejda,项目名称:livetranslator,代码行数:14,代码来源:Translator.php

示例8: __construct

 public function __construct(EntityManager $entityManager, Session $session, IBrowserControlFactory $browserFactory)
 {
     parent::__construct();
     $this->entityManager = $entityManager;
     $this->fileRepository = $entityManager->getRepository(File::class);
     $this->dirRepository = $entityManager->getRepository(Dir::class);
     $this->session = $session->getSection('Venne.Content.filesSide');
     $this->browserFactory = $browserFactory;
 }
开发者ID:venne,项目名称:files,代码行数:9,代码来源:FilesControl.php

示例9: __construct

 public function __construct(Nette\Http\Session $session, Nette\Caching\IStorage $cacheStorage, Nette\Http\Response $httpResponse)
 {
     $this->sessionStorage = $sessionStorage = $session->getSection(self::$namespace);
     $this->cache = new Nette\Caching\Cache($cacheStorage, self::$namespace);
     $this->httpResponse = $httpResponse;
     if (!isset($sessionStorage->newStrings) || !is_array($sessionStorage->newStrings)) {
         $sessionStorage->newStrings = array();
     }
 }
开发者ID:salamek,项目名称:gettexttranslator,代码行数:9,代码来源:Gettext.php

示例10: __construct

 /**
  * @param PayPal $payPal
  * @param Session $session
  */
 public function __construct(PayPal $payPal, Session $session)
 {
     parent::__construct();
     $this->payPal = $payPal;
     $this->session = $session->getSection('PayPalExpress');
     $this->session->setExpiration('+10 minutes');
     if (empty($this->session->token)) {
         $this->session->token = $this->_ec = Strings::random(6);
     }
 }
开发者ID:Hajneej,项目名称:PayPalExpress,代码行数:14,代码来源:PayControl.php

示例11: __construct

 /**
  * @param Article $article Clanek, ktery se komentuje
  * @param \Nette\Http\Session $session Session pro ulozeni hodnot pri nahledu komentare
  * @param \Kdyby\Translation\Translator $translator Prekladac
  * @param \App\Model\Repository\ArticleRepository $repository 
  */
 public function __construct(Article $article, \Nette\Http\Session $session, \Kdyby\Translation\Translator $translator, \App\Model\Repository\ArticleRepository $repository)
 {
     $this->article = $article;
     $this->commentSession = $session->getSection('comments');
     $this->translator = $translator;
     $this->articleRepository = $repository;
     $this->paginator = new \Nette\Utils\Paginator();
     $this->paginator->setItemsPerPage(self::COMMENT_PER_PAGE);
     $this->paginator->setPage(1);
 }
开发者ID:krupaj,项目名称:my-blog,代码行数:16,代码来源:CommentsFactory.php

示例12: __construct

 /**
  * @param Nette\Application\Application
  * @param Gettext\Translator\Gettext 
  * @param Nette\Http\Session
  * @param Nette\Http\Request
  * @param string
  * @param int
  */
 public function __construct(Nette\Application\Application $application, Gettext $translator, Nette\Http\Session $session, Nette\Http\Request $httpRequest, $layout, $height)
 {
     $this->application = $application;
     $this->translator = $translator;
     $this->sessionStorage = $session->getSection(Gettext::$namespace);
     $this->httpRequest = $httpRequest;
     $this->height = $height;
     $this->layout = $layout;
     $this->processRequest();
 }
开发者ID:salamek,项目名称:gettexttranslator,代码行数:18,代码来源:Panel.php

示例13: __construct

 public function __construct(Nette\Http\Session $session, Nette\Caching\IStorage $cacheStorage, Nette\Http\Response $httpResponse, FileManager $fileManager)
 {
     $this->sessionStorage = $sessionStorage = $session->getSection(self::$namespace);
     $this->cache = new Nette\Caching\Cache(new Nette\Caching\Storages\DevNullStorage(), self::$namespace);
     $this->httpResponse = $httpResponse;
     $this->fileManager = $fileManager;
     /*
     if (!isset($sessionStorage->newStrings) || !is_array($sessionStorage->newStrings)) {
     	$sessionStorage->newStrings = array();
     }
     */
 }
开发者ID:kosikcz,项目名称:gettext-translator,代码行数:12,代码来源:Gettext.php

示例14: __construct

 public function __construct(Messages $messages, Nette\Http\Session $session, Github\Api $api, User $user = NULL)
 {
     $this->session = $session->getSection('milo.github.nette-extension');
     $this->api = $api;
     $this->user = $user;
     foreach ($messages->getAll() as $message) {
         $this->onMessage($message);
     }
     # Change handler
     $api->getClient()->onRequest([$this, 'onMessage']);
     $api->getClient()->onResponse([$this, 'onMessage']);
 }
开发者ID:milo,项目名称:github-api-nette,代码行数:12,代码来源:Panel.php

示例15: setDebugMode

 /**
  * Sets debug mode.
  * @param boolean $debugMode
  */
 public function setDebugMode($debugMode)
 {
     $this->debugMode = $debugMode;
     if ($debugMode === true) {
         $this->sessionStorage = $this->session->getSection(Gettext::$namespace);
     }
 }
开发者ID:klimesf,项目名称:gettext-translator,代码行数:11,代码来源:Panel.php


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