Example #1
0
 /**
  * set the template name
  * each js will be loaded into this directory template
  * @access public
  * @param string $tpl
  */
 public function setTemplate($tpl)
 {
     if (isset($tpl) && !empty($tpl)) {
         $this->config->setDefaultTemplateName($tpl);
     }
     $this->_autoload_folder = $this->config->getStaticDirectory() . '/' . $this->config->getTemplatesDirectory() . '/' . $this->config->getDefaultTemplateName();
     $this->_autoload_folder .= '/css/' . $this->config->getAutoloadCSSDirectory();
     if ($this->config->getEnvironment() == "development") {
         $this->_autoload_link = array();
         if (is_dir($this->_autoload_folder)) {
             $dir = opendir($this->_autoload_folder);
             while ($file = readdir($dir)) {
                 if (strpos($file, ".css") !== FALSE) {
                     array_push($this->_autoload_link, $file);
                 }
             }
             closedir($dir);
             asort($this->_autoload_link);
             $this->createBaseFile($this->_autoload_link);
         }
     }
 }
Example #2
0
 /**
  * set the template name, each js will be loaded into this directory template
  * @access public
  * @param string $tpl
  */
 public function setTemplate($tpl)
 {
     if (isset($tpl) && !empty($tpl)) {
         $this->config->setDefaultTemplateName($tpl);
     }
 }