Ejemplo n.º 1
0
 public function __construct($app, $masterTemplate = 'template.php')
 {
     parent::__construct();
     $this->app = $app;
     $this->masterTemplate = $masterTemplate;
     $this->env = $app->environment();
 }
Ejemplo n.º 2
0
 public function __construct()
 {
     $this->jsAssets = new Container();
     $this->cssAssets = new Container();
     $this->titleParts = new TitleContainer();
     return parent::__construct();
 }
Ejemplo 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();
 }
Ejemplo 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;
     }
 }
Ejemplo 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;
 }
Ejemplo 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());
 }
Ejemplo 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'];
 }
Ejemplo 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);
 }
Ejemplo 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();
     }
 }
Ejemplo 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());
 }
Ejemplo 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'));
     }
 }
Ejemplo 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');
 }
Ejemplo 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();
 }
Ejemplo 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));
 }
Ejemplo n.º 16
0
 public function __construct(ObjectToArrayHelper $objectToArrayHelper)
 {
     parent::__construct();
     $this->objectToArrayHelper = $objectToArrayHelper;
 }
Ejemplo n.º 17
0
 public function __construct($app)
 {
     parent::__construct();
     $this->app = $app;
 }
Ejemplo 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;
 }
Ejemplo n.º 19
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->_loader = new \Twig_Loader_Filesystem();
     $this->_renderer = new \Twig_Environment($this->_loader);
 }
Ejemplo n.º 20
0
 public function __construct($themePath = 'defaultba')
 {
     parent::__construct();
     $this->setThemePath($themePath);
     return $this;
 }
Ejemplo n.º 21
0
 public function __construct(\Slim\Slim $app)
 {
     $this->app = $app;
     parent::__construct();
 }
Ejemplo n.º 22
0
 /**
  * @param array $settings
  */
 public function __construct(array $settings = [])
 {
     parent::__construct();
     $this->settings = $settings;
 }
Ejemplo n.º 23
0
 /**
  * コンストラクタ
  * 
  * @param Array $options
  */
 public function __construct($options)
 {
     parent::__construct();
     self::$twigOptions = $options;
 }
Ejemplo n.º 24
0
 public function __construct($debug = false)
 {
     parent::__construct();
     $this->debug = $debug;
 }
Ejemplo n.º 25
0
 /**
  * [__construct description]
  */
 public function __construct()
 {
     parent::__construct();
     $this->layoutView = new \Slim\View();
 }
Ejemplo n.º 26
0
 /**
  * Construct JsonApiView instance
  */
 public function __construct()
 {
     parent::__construct();
 }
Ejemplo n.º 27
0
 public function __construct(Slim $app)
 {
     parent::__construct();
     $this->app = $app;
     $this->setTemplatesDirectory(__DIR__ . '/../Responder/html');
 }
Ejemplo n.º 28
0
 /**
  * @param array [$options]
  * @return void
  */
 public function __construct($options = array())
 {
     parent::__construct();
 }
Ejemplo n.º 29
0
 /**
  * 
  * @param \Libs\MvcContext $context
  */
 function __construct(MvcContext $context)
 {
     parent::__construct();
     $this->context = $context;
     $this->init();
 }
Ejemplo n.º 30
0
 public function __construct()
 {
     parent::__construct();
     $this->bodyClasses = new \ArrayObject();
     $this->bodyProperties = new \ArrayObject();
 }