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


PHP Container::getParameters方法代码示例

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


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

示例1: create

 public function create()
 {
     $programModel = $this->em->reflection('Program');
     $sectionId = empty($this->sectionId) ? $this->context->getParameters()['sectionId'] : $this->sectionId;
     //$from
     $form = new ProgramEditFormControl($sectionId);
     $form->setDefaultTimeFrom($this->context->getParameters()['programStart']);
     $startPlusOneHour = clone $this->context->getParameters()['programStart'];
     $startPlusOneHour->add(\DateInterval::createFromDateString('1 hour'));
     $form->setDefaultTimeTo($startPlusOneHour);
     $form->setProgramId($this->programId);
     $form->setEm($programModel, $this->em);
     return $form;
 }
开发者ID:bombush,项目名称:NatsuCon,代码行数:14,代码来源:ProgramEditFormFactory.php

示例2: __construct

 public function __construct(Container $container)
 {
     $p = $container->getParameters();
     foreach (['app' => 'appDir', 'backup' => 'backupDir', 'bin' => 'binDir', 'libs' => 'libsDir', 'log' => 'logDir', 'migrations' => 'migrationsDir', 'temp' => 'tempDir', 'tests' => 'testsDir', 'www' => 'wwwDir'] as $prop => $key) {
         $this->{$prop} = $p[$key];
     }
 }
开发者ID:VasekPurchart,项目名称:khanovaskola-v3,代码行数:7,代码来源:Paths.php

示例3: __construct

 public function __construct(Container $context)
 {
     parent::__construct();
     $secured = NULL;
     if ($context->getParameters()['tls']) {
         Route::$defaultFlags |= Route::SECURED;
         $secured = Route::SECURED;
     }
     $this[] = new StaticRouter(['Homepage:default' => 'index.php'], StaticRouter::ONE_WAY | $secured);
     $this[] = new StaticRouter(['Homepage:default' => '', 'Homepage:marathon' => 'maraton', 'Homepage:preklad' => 'preklad', 'Profile:default' => 'profil', 'Auth:in' => 'prihlaseni', 'Auth:out' => 'odhlaseni', 'Auth:registration' => 'registrace', 'Auth:resetPassword' => 'heslo', 'Text:about' => 'o-skole', 'Text:team' => 'o-skole/tym', 'Subjects:default' => 'predmety', 'File:opensearch' => 'opensearch.xml', 'File:robots' => 'robots.txt', 'Sitemap:default' => 'sitemap.xml', 'Text:tos' => 'podminky', 'Text:privacy' => 'soukromi'], $secured);
     $this[] = new Route('vyhledavani/?hledat=<query>', 'Search:results');
     $this[] = new Route('vyhledavani/cviceni', 'Search:blueprints');
     $this[] = new Route('schema/[<action \\D+>/]<schemaId \\d+>[-<slug>]', 'Schema:default');
     $this[] = new Route('blok/[<action \\D+>/][<schemaId \\d+>/]<blockId \\d+>[-<slug>]', 'Block:default');
     $this[] = new Route('video/[<action \\D+>/][[<schemaId \\d+>/]<blockId \\d+>/]<videoId \\d+>[-<slug>]?zacatek=<startAtTime \\d+>', 'Video:default');
     $this[] = new Route('cviceni/[<action \\D+>/][[<schemaId \\d+>/]<blockId \\d+>/]<blueprintId \\d+>[-<slug>]', 'Blueprint:default');
     $this[] = new Route('tabule/[<action \\D+>/][[<schemaId \\d+>/]<blockId \\d+>/]<blackboardId \\d+>[-<slug>]?zacatek=<startAtTime \\d+>', 'Blackboard:default');
     // old links
     $this[] = new Route('video/<youtubeId>', 'Video:youtube');
     $this[] = new Redirect('dobrovolnici', 'https://wiki.khanovaskola.cz/doku.php?id=dobrovolnici');
     $this[] = new Redirect('dobrovolnici/preklad', 'https://wiki.khanovaskola.cz/doku.php?id=jaknato');
     $this[] = new Redirect('dobrovolnici/pravidla-prekladu', 'https://wiki.khanovaskola.cz/doku.php?id=pravidla');
     $this[] = new Redirect('o-skole/projekty', 'https://wiki.khanovaskola.cz/doku.php?id=start');
     $this[] = new Redirect('kontakt', 'https://wiki.khanovaskola.cz/doku.php?id=tym');
     $this[] = $context->createInstance(Routers\OldVideo::class);
     $this[] = $context->createInstance(Routers\OldCategory::class);
     $this[] = $context->createInstance(Routers\OldBlog::class);
     $this[] = new Route('<presenter>/<action \\D+>[/<id>]', 'Homepage:default');
 }
开发者ID:VasekPurchart,项目名称:khanovaskola-v3,代码行数:29,代码来源:Router.php

示例4: createFromContainer

 public static function createFromContainer(Container $context)
 {
     /** @var EntityManager $em */
     $em = $context->getByType(EntityManager::class);
     /** @var Configuration $conf */
     $conf = $context->getByType(Configuration::class);
     return new self($em, $conf, $context->getParameters()['tempDir']);
 }
开发者ID:instante,项目名称:php-test-suite,代码行数:8,代码来源:DoctrineTester.php

示例5: create

 static function create(Container $container)
 {
     $fakerinoConf = array();
     $configuration = $container->getParameters();
     if (array_key_exists(self::FAKERINO_TAG, $configuration)) {
         $fakerinoConf = $configuration[self::FAKERINO_TAG];
     }
     return Fakerino::create($fakerinoConf);
 }
开发者ID:fakerino,项目名称:nette-fakerino,代码行数:9,代码来源:FakerinoServiceFactory.php

示例6: __construct

 /**
  * @param Container $container
  * @param ManagerRegistry $registry
  */
 public function __construct(Container $container, ManagerRegistry $registry)
 {
     parent::__construct('dwarfSearch:import');
     $this->entityManager = $registry->getManager();
     $this->seasonsRepository = $registry->getRepository(Season::class);
     $this->episodesRepository = $registry->getRepository(Episode::class);
     $this->languagesRepository = $registry->getRepository(Language::class);
     $this->charactersRepository = $registry->getRepository(Character::class);
     $this->scenariosDir = Helpers::expand('%appDir%/../scenarios', $container->getParameters());
 }
开发者ID:legendik,项目名称:DwarfSearch,代码行数:14,代码来源:ScreenplayImportCommand.php

示例7: _after

 public function _after(TestInterface $test)
 {
     if ($this->container) {
         try {
             $this->container->getByType(Session::class)->close();
         } catch (MissingServiceException $e) {
         }
         try {
             $journal = $this->container->getByType(IJournal::class);
             if ($journal instanceof SQLiteJournal) {
                 $property = new ReflectionProperty(SQLiteJournal::class, 'pdo');
                 $property->setAccessible(true);
                 $property->setValue($journal, null);
             }
         } catch (MissingServiceException $e) {
         }
         FileSystem::delete(realpath($this->container->getParameters()['tempDir']));
     }
 }
开发者ID:arachne,项目名称:codeception,代码行数:19,代码来源:NetteDIModule.php

示例8: sendActivationEmail

 /**
  * @param string $email
  * @param \Model\Core\User\User $user
  */
 private function sendActivationEmail($email, $user)
 {
     $template = $this->template;
     $template->setFile(__DIR__ . "/activate.email.latte");
     $template->appname = $this->presenter->getAppName();
     $template->username = $user->getUsername();
     $key = $this->actionKey->createKey(\Model\Core\ActionKey\ActionKeyTypeCode::REGISTER, $user->getId());
     $template->link = $this->presenter->link("//Homepage:activate", array("id" => $user->getId(), "key" => $key->getKey()));
     $template->activate = $this->container->getParameters()["register"]["activation"];
     $this->mailer->createMessage($email, "Vítejte na " . $this->presenter->getAppName(), (string) $template);
     $this->mailer->send();
 }
开发者ID:JZechy,项目名称:ZBox,代码行数:16,代码来源:RegisterForm.php

示例9: lock

 private function lock()
 {
     Environment::lock('db', $this->context->getParameters()['tempDir']);
 }
开发者ID:rhrebecek,项目名称:skeleton,代码行数:4,代码来源:DatabaseTester.php

示例10: __construct

 /**
  * BasePresenter constructor.
  * @param \Nette\DI\Container $container
  */
 public function __construct(\Nette\DI\Container $container)
 {
     $params = $container->getParameters();
     $this->appspace = $params["appspace"];
     $this->appname = $params["appname"];
 }
开发者ID:JZechy,项目名称:ZBox,代码行数:10,代码来源:BasePresenter.php

示例11: injectParameters

 public function injectParameters(\Nette\DI\Container $di)
 {
     $this->conf = $di->getParameters();
 }
开发者ID:sg3tester,项目名称:songator,代码行数:4,代码来源:PrimePresenter.php

示例12: InjectableTrait_injectParameters

 public final function InjectableTrait_injectParameters(\Nette\DI\Container $container)
 {
     $this->InjectableTrait_parameters = $container->getParameters();
 }
开发者ID:dtforce,项目名称:nette-inject,代码行数:4,代码来源:InjectableTrait.php

示例13: __construct

 public function __construct(Container $container, \Nette\Http\Request $httpRequest)
 {
     $this->config = $container->getParameters();
     $this->httpRequest = $httpRequest;
 }
开发者ID:MrTommy1979,项目名称:reference,代码行数:5,代码来源:DescriptionForm.php

示例14: __construct

 /**
  * SmtpMailer constructor.
  * @param \Nette\DI\Container $container
  */
 public function __construct(\Nette\DI\Container $container)
 {
     $this->container = $container;
     $this->smtpMailer = new \Nette\Mail\SmtpMailer($container->getParameters()["mailer"]);
     $this->from = $container->getParameters()["mailer"]["from"];
 }
开发者ID:JZechy,项目名称:ZBox,代码行数:10,代码来源:Mailer.php


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