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); }
/** * @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']); } }
public function base($withUri = true, $appName = 'default') { $req = Yee::getInstance($appName)->request(); $uri = $req->getUrl(); if ($withUri) { $uri .= $req->getRootUri(); } return $uri; }
function __construct() { $this->app = Yee::getInstance(); }
public function __construct() { $this->app = \Yee\Yee::getInstance(); }
public function testConfigGettersAndSetters() { $app = new Yee(); $app->config("test", "DummyValue"); $this->assertEquals("DummyValue", $app->config("test")); }