Esempio n. 1
0
 public static function jsonHeader($xresponse_header, $xresponse_value)
 {
     $app = \Yee\Yee::getInstance();
     $app->response()->header($xresponse_header, $xresponse_value);
     $app->response()->header('content-type', 'application/json');
     $app->response()->header('expires', 0);
 }
Esempio n. 2
0
 /**
  * @param array $options
  */
 function __construct()
 {
     $app = \Yee\Yee::getInstance();
     $this->config = $app->config('database');
     foreach ($this->config as $key => $database) {
         $app->db[$key] = new MysqliDB($database['database.host'], $database['database.user'], $database['database.pass'], $database['database.name'], $database['database.port']);
     }
 }
Esempio n. 3
0
 public function base($withUri = true, $appName = 'default')
 {
     $req = Yee::getInstance($appName)->request();
     $uri = $req->getUrl();
     if ($withUri) {
         $uri .= $req->getRootUri();
     }
     return $uri;
 }
Esempio n. 4
0
 function __construct()
 {
     $this->app = Yee::getInstance();
 }
Esempio n. 5
0
 public function __construct()
 {
     $this->app = \Yee\Yee::getInstance();
 }
Esempio n. 6
0
 public function testConfigGettersAndSetters()
 {
     $app = new Yee();
     $app->config("test", "DummyValue");
     $this->assertEquals("DummyValue", $app->config("test"));
 }