Esempio n. 1
0
 public function __construct($options = null)
 {
     parent::__construct($options);
     if (array_key_exists('moduleUri', $this->getOptions())) {
         $this->moduleUri = $this->getOptions()['moduleUri'];
     }
     $this->dirs = Engine::getInstance()->getConfigDirs();
     $this->customRequireFunction = function ($name) {
         if (!array_key_exists($name, $this->loadedLibraries)) {
             $this->loadedLibraries[$name] = $this->customLibraries[$name];
             $collectionBase = $this->loadedLibraries[$name]['collection'];
             foreach ($this->loadedLibraries[$name]['resources'] as $type => $resource) {
                 $calledFunction = 'add' . ucfirst($type);
                 $path = $this->dirs['assets']->lib . $resource['path'];
                 $this->collection($collectionBase . '-' . $type)->{$calledFunction}($path, $resource['local'], $resource['filter'], $resource['attributes']);
             }
         }
     };
     $this->customOutputFunction = function ($name) {
         if (!array_key_exists($name, $this->loadedLibraries)) {
             return;
         }
         foreach ($this->loadedLibraries[$name]['resources'] as $type => $resource) {
             $collection = $this->loadedLibraries[$name]['collection'] . '-' . $type;
             $calledFunction = 'output' . ucfirst($type);
             $this->{$calledFunction}($collection);
         }
     };
     $this->initializeCustomMethods();
     $this->siteBaseUri = Service::get(Service::URL)->getBaseUri();
     $this->assetsUri = $this->dirs['public']->assets;
     $this->standardUri = $this->dirs['assets']->standard;
     $this->themesUri = $this->dirs['assets']->themes;
     $this->libUri = $this->dirs['assets']->lib;
     $this->collection('customjs');
     $this->collection('customcss');
 }
Esempio n. 2
0
 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->set('inline-css', new Collection());
     $this->set('inline-js', new Collection());
 }
Esempio n. 3
0
 /**
  * @param null $options
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->_collections = [];
 }