/**
  * Executes the cache clear.
  * @param InputInterface $input
  * @param OutputInterface $output
  * @return void
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     call_user_func(function () {
         $classLoader = (require \WFP2Environment::getRootPath() . 'vendor/autoload.php');
         (new \TYPO3\CMS\Backend\Console\Application($classLoader))->run();
     });
 }
示例#2
0
 /**
  * Renders a file.
  * @param string $template
  * @param string $target
  * @param array $parameters
  * @return void
  */
 protected function renderFile($template, $target, array $parameters = array())
 {
     $parameters['generator.file'] = str_replace(\WFP2Environment::getRootPath(), '', $target);
     $source = $this->render($template, $parameters);
     if (file_put_contents($target, $source) === false) {
         throw new \RuntimeException('File ' . $target . ' was not written');
     }
 }