static function makeToken($appId) { $appKey = Arr::get(self::$keys, $appId); $post = $_POST; $token = sha1($appId . $appKey . $post['api'] . $post['func'] . md5(json_encode($post['arguments']))); return $token; }
static function run() { $c = self::newInstance(); if ($c instanceof self) { $a = 'get' . ucfirst(Route::$action); if (Arr::get($_SERVER, 'REQUEST_METHOD') === 'POST') { $a = 'post' . ucfirst(Route::$action); } $c->filter($a); echo $c->{$a}(); } else { throw new HttpException(404); } }
static function run($filter) { self::init(); $func = Arr::get(self::$filters, $filter); return $func(); }
static function file($k) { return Arr::get($_FILES, $k); }
static function get($k, $default = null) { self::init(); return Arr::get(self::$flash, $k, Arr::get($_SESSION, $k, $default)); }
static function get($k, $v = null) { return Arr::get(self::$config, $k, $v); }
static function get($k) { return Arr::get($_COOKIE, $k); }