getParameters() public method

public getParameters ( ) : array
return array
Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 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];
     }
 }
Ejemplo n.º 3
0
 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');
 }
Ejemplo n.º 4
0
 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']);
 }
 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);
 }
 /**
  * @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());
 }
Ejemplo n.º 7
0
 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']));
     }
 }
Ejemplo n.º 8
0
 /**
  * @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();
 }
Ejemplo n.º 9
0
 private function lock()
 {
     Environment::lock('db', $this->context->getParameters()['tempDir']);
 }
Ejemplo n.º 10
0
 /**
  * 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"];
 }
Ejemplo n.º 11
0
 public function injectParameters(\Nette\DI\Container $di)
 {
     $this->conf = $di->getParameters();
 }
Ejemplo n.º 12
0
 public final function InjectableTrait_injectParameters(\Nette\DI\Container $container)
 {
     $this->InjectableTrait_parameters = $container->getParameters();
 }
Ejemplo n.º 13
0
 public function __construct(Container $container, \Nette\Http\Request $httpRequest)
 {
     $this->config = $container->getParameters();
     $this->httpRequest = $httpRequest;
 }
Ejemplo n.º 14
0
 /**
  * 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"];
 }