Ejemplo n.º 1
0
 /**
  * Initializes Fluid Standalone
  */
 public static function initialize()
 {
     require_once FLUID_ROOT_PATH . 'Classes/TYPO3/Fluid/Core/ClassLoader.php';
     $classLoader = new \TYPO3\Fluid\Core\ClassLoader();
     spl_autoload_register(array($classLoader, 'loadClass'), TRUE, TRUE);
     \TYPO3\Fluid\Utility\Environment::getInstance()->setTemporaryDirectoryBase(FLUID_ROOT_PATH . 'Data/');
     self::$resourcesPath = FLUID_ROOT_PATH . 'Resources/';
 }
 protected function initializeTemplateCompiler()
 {
     $templateCompiler = new \TYPO3\Fluid\Core\Compiler\TemplateCompiler();
     $cacheBackend = new \TYPO3\Fluid\Cache\Backend\FileBackend();
     $cacheBackend->injectEnvironment(\TYPO3\Fluid\Utility\Environment::getInstance());
     $cache = new \TYPO3\Fluid\Cache\Frontend\PhpFrontend('Fluid_TemplateCache', $cacheBackend);
     $templateCompiler->injectTemplateCache($cache);
     $this->injectTemplateCompiler($templateCompiler);
 }