Ejemplo 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);
 }
Ejemplo 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']);
     }
 }
Ejemplo 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;
 }
Ejemplo n.º 4
0
 function __construct()
 {
     $this->app = Yee::getInstance();
 }
Ejemplo n.º 5
0
 public function __construct()
 {
     $this->app = \Yee\Yee::getInstance();
 }
Ejemplo n.º 6
0
 public function testConfigGettersAndSetters()
 {
     $app = new Yee();
     $app->config("test", "DummyValue");
     $this->assertEquals("DummyValue", $app->config("test"));
 }