Esempio n. 1
0
 public function __construct($app, $masterTemplate = 'template.php')
 {
     parent::__construct();
     $this->app = $app;
     $this->masterTemplate = $masterTemplate;
     $this->env = $app->environment();
 }
Esempio n. 2
0
 public function __construct()
 {
     $this->jsAssets = new Container();
     $this->cssAssets = new Container();
     $this->titleParts = new TitleContainer();
     return parent::__construct();
 }
Esempio n. 3
0
 public function __construct($path)
 {
     $this->loader = new \Twig_Loader_Filesystem($path);
     $this->twig = new \Twig_Environment($this->loader);
     $this->twig->addExtension(new \Twig_Extensions_Extension_I18n());
     parent::__construct();
 }
Esempio n. 4
0
 /**
  * @param array [$options]
  * @return void
  */
 public function __construct($options = array())
 {
     parent::__construct();
     foreach (array_intersect_key($options, array_flip($this->allowedOptions)) as $key => $value) {
         $this->{$key} = $value;
     }
 }
Esempio n. 5
0
 /**
  * Constructor
  *
  * @param string $template_dir The base template directory
  * @param string $compile_dir  The directory in which to compile the templates
  * @param string $cache_dir    The directory in which to cache the compiled templates
  * @param string $plugin_dir   The directory containing Smarty plugins
  */
 public function __construct($template_dir, $compile_dir, $cache_dir, $plugin_dir = '')
 {
     parent::__construct();
     $this->template_dir = $template_dir;
     $this->compile_dir = $compile_dir;
     $this->cache_dir = $cache_dir;
     $this->plugin_dir = $plugin_dir;
 }
Esempio n. 6
0
 public function __construct()
 {
     parent::__construct();
     $this->context = new SplStack();
     $this->yield_blocks = array();
     $this->helpers = new \Slim\Helper\Set($this->getHelpers());
     $this->block_helpers = new \Slim\Helper\Set($this->getBlockHelpers());
 }
Esempio n. 7
0
 public function __construct(array $options = array())
 {
     parent::__construct();
     $this->options = array_merge($this->options, $options);
     if (!empty($this->options['overwrite'])) {
         $this->options['auto_reload'] = true;
     }
 }
 public function __construct($options)
 {
     parent::__construct();
     // Smarty対応
     self::$smartyDirectory = $options['smartyDirectory'];
     self::$smartyCompileDirectory = $options['smartyCompileDirectory'];
     self::$smartyCacheDirectory = $options['smartyCacheDirectory'];
     self::$smartyTemplatesDirectory = $options['smartyTemplatesDirectory'];
 }
Esempio n. 9
0
 /**
  * Class constructor.
  * Initializes helper manager.
  * 
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     // Initialize helper manager
     $this->_helperManager = new \Zend\View\HelperPluginManager();
     $this->_helperManager->setRenderer($this);
     // Inject form-related invokable helpers
     $helperConfig = new \Zend\Form\View\HelperConfig();
     $helperConfig->configureServiceManager($this->_helperManager);
 }
Esempio n. 10
0
 public function __construct($fenomConfig = [])
 {
     parent::__construct();
     $this->fenomConfig = array_merge($this->fenomConfig, $fenomConfig);
     $this->fenomCompileDir = $this->fenomConfig['cache_path'];
     unset($this->fenomConfig['cache_path']);
     if (empty($this->fenomCompileDir)) {
         $this->fenomCompileDir = sys_get_temp_dir();
     }
 }
Esempio n. 11
0
 public function __construct(Slim\Slim $app, MessageFormat $messageformat = null)
 {
     parent::__construct();
     $this->app = $app;
     $this->resources = array();
     if (!$messageformat) {
         $messageformat = new MessageFormat($this->getDefaultTemplatesDirectory() . '/_lang', 'en');
     }
     $this->setMessageFormat($messageformat);
     $this->setTemplatesDirectory($this->getDefaultTemplatesDirectory());
 }
Esempio n. 12
0
 public function __construct(\Nne\NneSlim $app, \Nne\Libs\Translator $translator)
 {
     parent::__construct();
     $this->app = $app;
     $this->translator = $translator;
     $chars = get_html_translation_table(HTML_ENTITIES);
     $remove = get_html_translation_table(HTML_SPECIALCHARS);
     unset($remove['&']);
     $this->chars = array_diff($chars, $remove);
     if ($this->app->isAdmin()) {
         $this->_pathPrefix = 'admin';
         //$this->setTemplatesDirectory($this->app->config('templates.admin.path'));
     }
 }
Esempio n. 13
0
 /**
  * Initalizer a.k.a the class constructor
  * Leave the third arguments empty if you won't use any layout
  *
  * @param array  $options  Options for BladeView
  *
  * @return KrisanAlfa\Blade\BladeView
  */
 public function __construct(array $options)
 {
     parent::__construct();
     $this->app = App::getInstance();
     $this->container = new Container();
     $viewPaths = $this->resolvePath($options['viewPaths']);
     $this->container->singleton('view.paths', function () use($viewPaths) {
         return $viewPaths;
     });
     $cachePath = $options['cachePath'];
     $this->container->singleton('cache.path', function () use($cachePath) {
         return $cachePath;
     });
     $this->registerFilesystem();
     $this->registerEvents();
     $this->registerEngineResolver();
     $this->registerViewFinder();
     $this->registerFactory();
     $this->instance = $this->container->make('view');
 }
Esempio n. 14
0
 function __construct()
 {
     parent::__construct();
     require_once __DIR__ . '/../../Twig/lib/Twig/Autoloader.php';
     Twig_Autoloader::register();
     $loader = new \Twig_Loader_Filesystem();
     $locations = \Raptor\Raptor::getInstance()->getConfigurationLoader()->getOptions();
     $templates = $locations['location'];
     foreach ($templates as $key => $value) {
         if (!file_exists($value . '/Views')) {
             mkdir($value . '/Views');
         }
         $loader->addPath($value . '/Views', $key);
     }
     //        if (\Raptor\Raptor::getInstance()->getMode() == 'development') {
     if (\Raptor\Raptor::getInstance()->config('debug')) {
         $this->twig = new Twig_Environment($loader, array());
     } else {
         $this->twig = new Twig_Environment($loader, array('cache' => \Raptor\Core\Location::get(\Raptor\Core\Location::CACHE) . '/7u136'));
     }
     $this->register();
 }
Esempio n. 15
0
 public function __construct(AssetManager $asset_manager)
 {
     parent::__construct();
     $this->_assetManager = $asset_manager;
     $app = App::i();
     $this->documentMeta = new \ArrayObject();
     $this->bodyClasses = new \ArrayObject();
     $this->bodyProperties = new \ArrayObject();
     $this->jsObject = new \ArrayObject();
     $this->jsObject['baseURL'] = $app->baseUrl;
     $this->jsObject['assetURL'] = $app->assetUrl;
     $this->jsObject['maxUploadSize'] = $app->getMaxUploadSize($useSuffix = false);
     $this->jsObject['maxUploadSizeFormatted'] = $app->getMaxUploadSize();
     $folders = [];
     $class = get_called_class();
     while ($class !== __CLASS__) {
         if (!method_exists($class, 'getThemeFolder')) {
             throw new \Exception("getThemeFolder method is required for theme classes and is not present in {$class} class");
         }
         $folders[] = $class::getThemeFolder() . '/';
         $class = get_parent_class($class);
     }
     $this->path = new \ArrayObject(array_reverse($folders));
 }
Esempio n. 16
0
 public function __construct(ObjectToArrayHelper $objectToArrayHelper)
 {
     parent::__construct();
     $this->objectToArrayHelper = $objectToArrayHelper;
 }
Esempio n. 17
0
 public function __construct($app)
 {
     parent::__construct();
     $this->app = $app;
 }
Esempio n. 18
0
 /**
  * Construct JsonApiView instance
  * @param type $dataWrapper (optional) Wrapper for data in response
  * @param type $metaWrapper (optional) Wrapper for metadata in response
  */
 public function __construct($dataWrapper = NULL, $metaWrapper = NULL)
 {
     parent::__construct();
     $this->dataWraper = $dataWrapper;
     $this->metaWrapper = $metaWrapper;
 }
Esempio n. 19
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->_loader = new \Twig_Loader_Filesystem();
     $this->_renderer = new \Twig_Environment($this->_loader);
 }
Esempio n. 20
0
 public function __construct($themePath = 'defaultba')
 {
     parent::__construct();
     $this->setThemePath($themePath);
     return $this;
 }
Esempio n. 21
0
 public function __construct(\Slim\Slim $app)
 {
     $this->app = $app;
     parent::__construct();
 }
Esempio n. 22
0
 /**
  * @param array $settings
  */
 public function __construct(array $settings = [])
 {
     parent::__construct();
     $this->settings = $settings;
 }
 /**
  * コンストラクタ
  * 
  * @param Array $options
  */
 public function __construct($options)
 {
     parent::__construct();
     self::$twigOptions = $options;
 }
Esempio n. 24
0
 public function __construct($debug = false)
 {
     parent::__construct();
     $this->debug = $debug;
 }
Esempio n. 25
0
 /**
  * [__construct description]
  */
 public function __construct()
 {
     parent::__construct();
     $this->layoutView = new \Slim\View();
 }
Esempio n. 26
0
 /**
  * Construct JsonApiView instance
  */
 public function __construct()
 {
     parent::__construct();
 }
Esempio n. 27
0
 public function __construct(Slim $app)
 {
     parent::__construct();
     $this->app = $app;
     $this->setTemplatesDirectory(__DIR__ . '/../Responder/html');
 }
Esempio n. 28
0
 /**
  * @param array [$options]
  * @return void
  */
 public function __construct($options = array())
 {
     parent::__construct();
 }
Esempio n. 29
0
 /**
  * 
  * @param \Libs\MvcContext $context
  */
 function __construct(MvcContext $context)
 {
     parent::__construct();
     $this->context = $context;
     $this->init();
 }
Esempio n. 30
0
 public function __construct()
 {
     parent::__construct();
     $this->bodyClasses = new \ArrayObject();
     $this->bodyProperties = new \ArrayObject();
 }