Пример #1
0
 public function addJS($js)
 {
     $filename = basename($js);
     $data = file_get_contents(TigerApp::AppRoot() . "/" . $js);
     $id = md5($filename);
     $publicLocation = "cache/{$id}.js";
     $publicLocationOnDisk = TigerApp::AppRoot() . "/public/" . $publicLocation;
     if (!file_exists(dirname($publicLocationOnDisk))) {
         mkdir(dirname($publicLocationOnDisk), 0777, true);
     }
     file_put_contents($publicLocationOnDisk, $data);
     chmod($publicLocationOnDisk, 0664);
     $this->_js[] = $publicLocation;
     return $this;
 }
Пример #2
0
 public function setUp()
 {
     TigerApp::run();
     $this->tigerView = new TigerView();
     $this->rrmdir(TigerApp::AppRoot() . "/public/cache");
 }
Пример #3
0
 public function testParseConfig()
 {
     TigerApp::run()->begin()->parseConfig(TigerApp::AppRoot() . "/config/Default.yaml");
 }