Ejemplo n.º 1
0
 public function __construct($params = array())
 {
     $this->_params = $params;
     $this->view = new View(core\Conf::init()->getAppPath() . 'view');
     $this->view->set(array("_util" => Util::init(), "_config" => core\Conf::init(), "_jspath" => core\Conf::init()->getConf("JSPATH"), "_csspath" => core\Conf::init()->getConf("CSSPATH"), "_imgpath" => core\Conf::init()->getConf("IMGPATH")));
     $this->initialize();
 }
Ejemplo n.º 2
0
 public function addScript($js)
 {
     $path = core\Conf::init()->getConf("JSPATH");
     $version = core\Conf::init()->getEnviroment() === 'production' ? core\Conf::init()->getConf("JSVERSION") : time();
     if (is_array($js)) {
         foreach ($js as $j) {
             $_path = $this->isRealLink($j) ? "" : $path;
             echo '<script src="' . $_path . $j . "?_t=" . $version . '"></script>';
         }
     } else {
         $_path = $this->isRealLink($js) ? "" : $path;
         echo '<script src="' . $_path . $js . "?_t=" . $version . '"></script>';
     }
 }