Пример #1
0
function insertAnalytics()
{
    $yamlparser = new \Symfony\Component\Yaml\Parser();
    $config = $yamlparser->parse(file_get_contents(__DIR__ . '/config.yml'));
    if (empty($config['webproperty'])) {
        $config['webproperty'] = "property-not-set";
    }
    $html = <<<EOM

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', '%webproperty%']);
  _gaq.push(['_setDomainName', '%domainname%']);
  _gaq.push(['_trackPageview']);

  (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
EOM;
    $html = str_replace("%webproperty%", $config['webproperty'], $html);
    $html = str_replace("%domainname%", $_SERVER['HTTP_HOST'], $html);
    return $html;
}
Пример #2
0
 public function __construct(array $files = null)
 {
     $files = is_null($files) ? $this->findAllConfigurationFiles() : $files;
     if (count($files) == 0) {
         throw new \StackFormation\Exception\NoBlueprintsFoundException("Could not find any blueprints.yml configuration files");
     }
     $yamlParser = new \Symfony\Component\Yaml\Parser();
     $config = [];
     $stacknames = [];
     foreach ($files as $file) {
         $basePath = dirname(realpath($file));
         $tmp = $yamlParser->parse(file_get_contents($file));
         if (isset($tmp['blueprints']) && is_array($tmp['blueprints'])) {
             foreach ($tmp['blueprints'] as &$blueprintConfig) {
                 // check for multiple usage of the same stackname
                 $stackname = $blueprintConfig['stackname'];
                 if (in_array($stackname, $stacknames)) {
                     throw new \Exception("Stackname '{$stackname}' was declared more than once.");
                 }
                 if (empty($blueprintConfig['template'])) {
                     throw new \Exception("Stackname '{$stackname}' does not specify a template.");
                 }
                 $stacknames[] = $stackname;
                 $blueprintConfig['basepath'] = $basePath;
             }
         }
         $config[] = $tmp;
     }
     $processor = new \Symfony\Component\Config\Definition\Processor();
     $this->conf = $processor->processConfiguration(new ConfigTreeBuilder(), $config);
 }
Пример #3
0
function twitterButton()
{
    global $app;
    $yamlparser = new \Symfony\Component\Yaml\Parser();
    $config = $yamlparser->parse(file_get_contents(__DIR__ . '/config.yml'));
    if (empty($config['via'])) {
        $config['via'] = "";
    }
    if (!empty($config['count']) && $config['count'] == false) {
        $config['count'] = 'data-count="none"';
    } else {
        $config['count'] = '';
    }
    if (empty($config['url'])) {
        $config['url'] = $app['paths']['canonicalurl'];
    }
    // code from: https://twitter.com/about/resources/buttons#tweet
    $html = <<<EOM
    <a href="https://twitter.com/share" class="twitter-share-button" data-via="%via%" %count% data-url="%url%" data-dnt="true">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
EOM;
    $html = str_replace("%url%", $config['url'], $html);
    $html = str_replace("%via%", $config['via'], $html);
    $html = str_replace("%count%", $config['count'], $html);
    return $html;
}
Пример #4
0
 public function testCreateSchemaFromYaml()
 {
     $yamlParser = new \Symfony\Component\Yaml\Parser();
     $yaml = $yamlParser->parse(file_get_contents(__DIR__ . '/testSchema.yml'));
     $tuersteher = new \Tuersteher\Tuersteher();
     $validatorResult = new \Tuersteher\Test\ValidatorResult();
     $tuersteher->setValidatorResult($validatorResult);
     $schemaResult = new \Tuersteher\Test\SchemaResult();
     $tuersteher->setSchemaResult($schemaResult);
     $schema = $tuersteher->createSchemaFromYaml($yaml);
     $this->assertInstanceOf('\\Tuersteher\\Validator\\Schema', $schema);
     $values = array('url' => 'http://google.com?q=bla', 'email' => '*****@*****.**', 'age' => '50');
     $isValid1 = $schema->validate($values);
     $this->assertTrue($isValid1());
     $values2 = array('url' => 'http://google.com', 'email' => 'keineemailadresse', 'age' => '5');
     $isValid2 = $schema->validate($values2);
     $this->assertFalse($isValid2());
     $values3 = array('url' => 'http://google.com?q=bla', 'age' => '50');
     $isValid3 = $schema->validate($values3);
     $this->assertFalse($isValid3());
     $values4 = array('email' => '*****@*****.**', 'age' => '50');
     $isValid4 = $schema->validate($values4);
     $this->assertTrue($isValid4());
     $this->setExpectedException('\\Tuersteher\\Exception\\InvalidArgument');
     $schema->validate($this);
 }
Пример #5
0
 public function formatPsvAction()
 {
     $form = new \Zend\Form\Form();
     $form->setAttribute('method', 'post');
     $factory = $this->getServiceLocator()->get('DatabaseFactory');
     $form->add(array('name' => 'psv', 'attributes' => array('type' => 'textarea', 'class' => 'input-lg', 'style' => 'width:900px;height:300px;')));
     $form->add(array('name' => 'replacements', 'attributes' => array('type' => 'textarea', 'class' => 'input-lg', 'style' => 'width:900px;height:150px;')));
     $form->add(array('name' => 'exclude', 'attributes' => array('type' => 'text', 'class' => 'input-lg', 'style' => 'width:900px;')));
     $form->bind(new \ArrayObject($this->params()->fromPost()));
     $viewModel = new ViewModel();
     $viewModel->setVariable('form', $form);
     $psv = $this->params()->fromPost('psv');
     if ($psv) {
         //            $parser = new \UnitTest\Lib\TestDbAcle
         //            $results = ;
         $exclude = [];
         if ($this->params()->fromPost('exclude')) {
             $exclude = $this->params()->fromPost('exclude') ? explode(",", $this->params()->fromPost('exclude')) : [];
         }
         if ($this->params()->fromPost('replacements')) {
             $yamlParser = new \Symfony\Component\Yaml\Parser();
             $replacements = $yamlParser->parse($this->params()->fromPost('replacements'));
             $results = $this->replacePlaceHolders($replacements, $replacements);
         }
         $formatted = \UnitTest\Lib\TestDbAcle\CsvFormatter::format($results, $exclude);
         $viewModel->setVariable("result", $formatted);
     }
     return $viewModel;
 }
Пример #6
0
 public function load($configFile)
 {
     $yaml = new \Symfony\Component\Yaml\Parser();
     foreach ($yaml->parse(file_get_contents($configFile)) as $key => $value) {
         $this->oConfig->{$key} = $value;
     }
 }
Пример #7
0
 /**
  * Load the given configuration group.
  *
  * @param  string  $environment
  * @param  string  $group
  * @param  string  $namespace
  * @return array
  */
 public function load($environment, $group, $namespace = null)
 {
     $yaml = new \Symfony\Component\Yaml\Parser();
     $items = array();
     // First we'll get the root configuration path for the environment which is
     // where all of the configuration files live for that namespace, as well
     // as any environment folders with their specific configuration items.
     $path = $this->getPath($namespace);
     if (is_null($path)) {
         return $items;
     }
     // First we'll get the main configuration file for the groups. Once we have
     // that we can check for any environment specific files, which will get
     // merged on top of the main arrays to make the environments cascade.
     $file = "{$path}/{$group}.yml";
     if ($this->files->exists($file)) {
         //			$items = $this->files->getRequire($file);
         $items = $yaml->parse(utf8_encode(file_get_contents($file)));
     }
     // Finally we're ready to check for the environment specific configuration
     // file which will be merged on top of the main arrays so that they get
     // precedence over them if we are currently in an environments setup.
     $file = "{$path}/{$environment}/{$group}.yml";
     if ($this->files->exists($file)) {
         //			$items = $this->mergeEnvironment($items, $file);
         $items = array_replace_recursive($items, $yaml->parse(utf8_encode(file_get_contents($file))));
     }
     return $items;
 }
Пример #8
0
 /**
  * Initialize NiceUrls. Called during bootstrap phase.
  * For subrequests in Silex, see
  * https://github.com/fabpot/Silex/blob/master/doc/cookbook/sub_requests.rst
  */
 public function initialize()
 {
     $yamlparser = new \Symfony\Component\Yaml\Parser();
     $this->config = $yamlparser->parse(file_get_contents(__DIR__ . '/config.yml'));
     $this->addTwigFilter('niceurl', 'niceUrlFilter');
     $this->processRouting();
 }
Пример #9
0
function facebookLike()
{
    global $app;
    $yamlparser = new \Symfony\Component\Yaml\Parser();
    $config = $yamlparser->parse(file_get_contents(__DIR__ . '/config.yml'));
    if (empty($config['style'])) {
        $config['style'] = "standard";
    }
    if (empty($config['width'])) {
        $config['width'] = "350px";
    }
    if (empty($config['verb'])) {
        $config['verb'] = "like";
    }
    if (empty($config['scheme'])) {
        $config['scheme'] = "light";
    }
    if (empty($config['url'])) {
        $config['url'] = $app['paths']['canonicalurl'];
    }
    // code from http://developers.facebook.com/docs/reference/plugins/like/
    $html = <<<EOM
    <div class="fb-like" data-href="%url%" data-send="false" data-layout="%style%" data-width="%width%"
    data-show-faces="false" data-action="%verb%" data-colorscheme="%scheme%"></div>
EOM;
    // data-href="http://example.org"
    $html = str_replace("%url%", $config['url'], $html);
    $html = str_replace("%style%", $config['style'], $html);
    $html = str_replace("%width%", $config['width'], $html);
    $html = str_replace("%verb%", $config['verb'], $html);
    $html = str_replace("%scheme%", $config['scheme'], $html);
    return $html;
}
Пример #10
0
function disqus($title = "")
{
    global $app;
    $yamlparser = new \Symfony\Component\Yaml\Parser();
    $config = $yamlparser->parse(file_get_contents(__DIR__ . '/config.yml'));
    if (empty($config['disqus_name'])) {
        $config['disqus_name'] = "No name set";
    }
    $html = <<<EOM
        <div id="disqus_thread"></div>
        <script type="text/javascript">
            var disqus_shortname = '%shortname%';
            %title%var disqus_url = '%url%';

            (function() {
                var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
                dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
                (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
            })();
        </script>
        <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
        <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

EOM;
    if ($title != "") {
        $title = "var disqus_title = '" . htmlspecialchars($title, ENT_QUOTES, "UTF-8") . "';\n";
    } else {
        $title = "";
    }
    // echo "<pre>\n" . \util::var_dump($app['paths'], true) . "</pre>\n";
    $html = str_replace("%shortname%", $config['disqus_name'], $html);
    $html = str_replace("%url%", $app['paths']['canonicalurl'], $html);
    $html = str_replace("%title%", $title, $html);
    return $html;
}
Пример #11
0
 /**
  * Get the config file. If it doesn't exist, attempt to fall back to config.yml.dist,
  * and rename it to config.yml.
  *
  * @return array
  */
 public function getConfig()
 {
     $configfile = $this->getConfigFile();
     $configdistfile = $this->basepath . '/config.yml.dist';
     // If it's readable, we're cool
     if (is_readable($configfile)) {
         $yamlparser = new \Symfony\Component\Yaml\Parser();
         $this->config = $yamlparser->parse(file_get_contents($configfile) . "\n");
         return $this->config;
     }
     // Otherwise, check if there's a config.yml.dist
     if (is_readable($configdistfile)) {
         $yamlparser = new \Symfony\Component\Yaml\Parser();
         $this->config = $yamlparser->parse(file_get_contents($configdistfile) . "\n");
         // If config.yml.dist exists, attempt to copy it to config.yml.
         if (copy($configdistfile, $configfile)) {
             // Success!
             $this->app['log']->add("Copied 'extensions/" . $this->namespace . "/config.yml.dist' to 'extensions/" . $this->namespace . "/config.yml'.", 2);
         } else {
             // Failure!!
             $message = "Couldn't copy 'extensions/" . $this->namespace . "/config.yml.dist' to 'extensions/" . $this->namespace . "/config.yml': File is not writable. Create the file manually, or make the folder writable.";
             $this->app['log']->add($message, 3);
             $this->app['session']->getFlashBag()->set('error', $message);
         }
         return $this->config;
     }
     // Nope. No config.
     return false;
 }
Пример #12
0
function getConfig()
{
    $config = array();
    $yamlParser = new \Symfony\Component\Yaml\Parser();
    $config['general'] = $yamlParser->parse(file_get_contents(JAZZ_CONFIG_DIR . "/config.yml") . "\n");
    return $config;
}
 function it_should_extends_standard_templates()
 {
     $yaml = new \Symfony\Component\Yaml\Parser();
     $value = $yaml->parse(file_get_contents(realpath(__DIR__ . '/../../../../Action/Template/edit.yml')));
     $options = array_merge($value, $this->getOptions());
     $this->useDefaults($this->getOptions())->shouldBe($options);
 }
Пример #14
0
 protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
 {
     $parser = new \Symfony\Component\Yaml\Parser();
     $parametersFile = file_get_contents($this->getRootDir() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'parameters.yml');
     $parameters = $parser->parse($parametersFile);
     $c->loadFromExtension('framework', ['secret' => 'none']);
     $c->addDefinitions(['git_automation.jira_api' => $this->createJiraApiService($parameters['parameters'])]);
 }
Пример #15
0
 /**
  * Load comics from YAML file
  *
  * @param string $file
  */
 public function loadYaml($file)
 {
     $yaml = new \Symfony\Component\Yaml\Parser();
     $value = $yaml->parse(file_get_contents($file));
     foreach ($value as $id => $params) {
         $this->comics->append(new Entry($id, $params));
     }
 }
Пример #16
0
 private function getInput()
 {
     $yaml = new \Symfony\Component\Yaml\Parser();
     $local_defaults = $yaml->parse(file_get_contents(__DIR__ . '/../configs/default.yml'));
     $local_defaults['root'] = __DIR__ . '/../../';
     $input = new GinnyInput($local_defaults);
     $input->bind(new GinnyDefinition());
     return $input;
 }
Пример #17
0
 /**
  * Load the configuration data into the object
  * 	from the defined YAML file
  *
  * @return array Set of configuration data
  */
 public function load()
 {
     $yaml = new \Symfony\Component\Yaml\Parser();
     $config = $yaml->parse(file_get_contents($this->path));
     foreach ($config as $route => $setup) {
         $this->config[$route] = new \Psecio\Invoke\RouteContainer($route, $setup);
     }
     return $this->config;
 }
Пример #18
0
 /**
  * @return array
  *
  * @throws ParsingException
  */
 public function parse()
 {
     try {
         $parser = new \Symfony\Component\Yaml\Parser();
         $parsed = $parser->parse($this->getContent());
     } catch (ParseException $e) {
         throw new ParsingException("Cannot parse this file: " . $e->getMessage(), 0, $e);
     }
     return $parsed;
 }
Пример #19
0
 /**
  * Get the menu for the current 'version' as an array.
  *
  * @param string $filename
  *
  * @return array
  */
 public function getMenu($filename)
 {
     $sourceFile = sprintf('%s/%s', $this->basepath, $filename);
     if (!is_readable($sourceFile)) {
         return [];
     }
     $yaml = new \Symfony\Component\Yaml\Parser();
     $this->menu = $yaml->parse(file_get_contents($sourceFile));
     return $this->menu;
 }
Пример #20
0
 protected function getConfig()
 {
     // use native pecl extension
     if ($this->options['pecl']) {
         return yaml_parse_file($this->path);
     }
     // use Symfony component
     $parser = new \Symfony\Component\Yaml\Parser();
     return $parser->parse(file_get_contents($this->path));
 }
Пример #21
0
 /**
  * @covers \Foote\Ginny\Command\GinnyCommand::execute
  */
 public function testexecute()
 {
     $yaml = new \Symfony\Component\Yaml\Parser();
     $local_defaults = $yaml->parse(file_get_contents(__DIR__ . '/../configs/default.yml'));
     $local_defaults['root'] = __DIR__ . '/../../';
     $input = new GinnyInput($local_defaults);
     $cmd = new GinnyCommand();
     //nothing happens
     $cmd->run($input, new ConsoleOutput(ConsoleOutput::VERBOSITY_QUIET));
 }
Пример #22
0
 /**
  * Load the configuration from the given path
  *
  * @param string $configPath Path to YAML configuration file
  * @return array Configuration data set
  */
 public function loadConfig($configPath)
 {
     $yaml = new \Symfony\Component\Yaml\Parser();
     $config = $yaml->parse(file_get_contents($configPath));
     if (is_array($config) && !empty($config)) {
         foreach ($config as $route => $setup) {
             $this->config[$route] = new RouteContainer($route, $setup);
         }
     }
     return $this->config;
 }
Пример #23
0
 private function parseConfigYaml($basename, $default = array())
 {
     static $yamlparser = false;
     if ($yamlparser === false) {
         $yamlparser = new \Symfony\Component\Yaml\Parser();
     }
     $filename = BOLT_CONFIG_DIR . '/' . $basename;
     if (is_readable($filename)) {
         return $yamlparser->parse(file_get_contents($filename) . "\n");
     }
     return $default;
 }
Пример #24
0
function twigHelloworld($name = "")
{
    $yamlparser = new \Symfony\Component\Yaml\Parser();
    $config = $yamlparser->parse(file_get_contents(__DIR__ . '/config.yml'));
    // if $name isn't set, use the one from the config.yml. Unless that's empty too, then use "world".
    if (empty($name)) {
        if (!empty($config['name'])) {
            $name = $config['name'];
        } else {
            $name = "World";
        }
    }
    return "Hello, " . $name . "!";
}
Пример #25
0
 /**
  * Sets config defined in YAML config file.
  *
  * @param string $configDir Location of config file.
  *
  * @throws ParseException if YAML file cannot be parsed.
  * @throws \Exception     if Host or API key config values are not set
  */
 public function __construct($configDir = self::CONFIG_DIR)
 {
     $yaml = new \Symfony\Component\Yaml\Parser();
     try {
         $config = $yaml->parse(file_get_contents($configDir));
     } catch (ParseException $e) {
         printf('Unable to parse the YAML string: %s', $e->getMessage());
     }
     if (!isset($config[0]['host'][0]) || !isset($config[1]['apiKey'][0])) {
         throw new \Exception('You must set Host and API key values in the config file');
     }
     $this->host = $config[0]['host'][0];
     $this->apiKey = $config[1]['apiKey'][0];
 }
Пример #26
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $file = $input->getArgument("file");
     $baseDir = getcwd();
     $parser = new \Symfony\Component\Yaml\Parser();
     $data = $parser->parse(file_get_contents($baseDir . "/" . $file));
     foreach ($data as $name => $config) {
         switch ($config["type"]) {
             case "Object":
                 $gen = new ObjectGenerator($name, $config);
                 $output->writeln($gen->generate());
         }
     }
 }
Пример #27
0
 public static function parse_yaml($file_path)
 {
     $yaml_parser = new \Symfony\Component\Yaml\Parser();
     $data = array();
     if (file_exists($file_path)) {
         try {
             $parsed = $yaml_parser->parse(file_get_contents($file_path));
             if (is_array($parsed)) {
                 $data = $parsed;
             }
         } catch (Symfony\Component\Yaml\Exception\ParseException $e) {
             throw new Exception("Parse error on '" . basename($file_path) . "': " . $e->getMessage());
         }
     }
     return $data;
 }
Пример #28
0
 public static function convert(GinnyInput $input)
 {
     $path = $input->getOption('schema_path');
     $parser = new \Symfony\Component\Yaml\Parser();
     if (is_dir($path)) {
         $data['name'] = $input->getOption('bundle');
         $data['namespace'] = $input->getOption('namespace');
         $data['models'] = [];
         $data['associations'] = [];
         $data['manyToManys'] = [];
         $schema_filename = $input->getOption('schema_filename');
         if (empty($schema_filename)) {
             $filenames = [];
             $finder = new \Symfony\Component\Finder\Finder();
             $finder->files()->in($input->getFullSchemaPath());
             foreach ($finder as $file) {
                 if ($file->getFilename() != 'ginny.yml') {
                     $filenames[] = $file->getFilename();
                 }
             }
         } else {
             $filenames = explode(',', $schema_filename);
         }
         foreach ($filenames as $filename) {
             $file = $parser->parse(file_get_contents($path . $filename));
             if (!empty($file['model'])) {
                 $defaults = ['name' => '', 'description' => ''];
                 $model = array_merge($defaults, $file['model']);
                 $defaults = ['name' => '', 'type' => '', 'size' => '', 'default' => false, 'required' => false, 'unique' => false, 'primary' => false, 'autoIncrement' => false];
                 foreach ($model['fields'] as $n => $field) {
                     $model['fields'][$n] = array_merge($defaults, $field);
                 }
                 $data['models'][] = $model;
             }
             if (!empty($file['associations'])) {
                 $data['associations'] = array_merge($data['associations'], $file['associations']);
             }
             if (!empty($file['manyToManys'])) {
                 $data['manyToManys'] = array_merge($data['manyToManys'], $file['manyToManys']);
             }
         }
         return ['bundles' => [$data]];
     }
     echo 'booger!';
     exit;
 }
Пример #29
0
 public static function getOptions($file, $profile = null, $localFile = null)
 {
     if (file_exists($file)) {
         $f = new \SplFileObject($file);
         switch ($f->getExtension()) {
             case "php":
                 $standardOptions = (include $file);
                 if (file_exists($localFile)) {
                     $localOptions = (include $localFile);
                 }
                 break;
             case "yaml":
             case "yml":
                 $parser = new \Symfony\Component\Yaml\Parser();
                 $standardOptions = $parser->parse(file_get_contents($file));
                 if (file_exists($localFile)) {
                     $localOptions = $parser->parse(file_get_contents($localFile));
                 }
                 break;
             case "json":
                 $standardOptions = json_decode(file_get_contents($file), true);
                 if (file_exists($localFile)) {
                     $localOptions = json_decode(file_get_contents($localFile), true);
                 }
                 break;
             default:
                 throw new \InvalidArgumentException("File type " . $f->getExtension() . " not supported");
         }
         if (is_array($localOptions) && count($localOptions)) {
             $options = array_replace_recursive($standardOptions, $localOptions);
         } else {
             $options = $standardOptions;
         }
         if (!is_array($options)) {
             throw new \RuntimeException("Found no usable data in {$file}");
         } else {
             if ($profile) {
                 return self::resolveInheritance($options, $profile);
             }
             return $options;
         }
     } else {
         throw new \InvalidArgumentException("{$file} does not exist or could not be read");
     }
 }
Пример #30
0
/**
 * Initialize NiceUrls. Called during bootstrap phase.
 * For subrequests in Silex, see
 * https://github.com/fabpot/Silex/blob/master/doc/cookbook/sub_requests.rst
 */
function init(\Silex\Application $app)
{
    $yamlparser = new \Symfony\Component\Yaml\Parser();
    $config = $yamlparser->parse(file_get_contents(__DIR__ . '/config.yml'));
    foreach ($config as $routingData) {
        if (isValidRoutingData($routingData)) {
            $app->match('/' . $routingData['from']['slug'], function (Request $request) use($app, $routingData) {
                $app['end'] = 'frontend';
                $uri = $request->getUriForPath("/" . $routingData['to']['contenttypeslug'] . '/' . $routingData['to']['slug']);
                $subRequest = Request::create($uri, 'GET', array(), $request->cookies->all(), array(), $request->server->all());
                if ($request->getSession()) {
                    $subRequest->setSession($request->getSession());
                }
                return $app->handle($subRequest, HttpKernelInterface::SUB_REQUEST, false);
            });
        }
    }
}