Application now initialized in Flight::app() instead of __callStatic.

pull/184/merge
Mike Cao 9 years ago
parent 4bb1b49385
commit 486ec7c689

@ -52,6 +52,15 @@ class Flight {
* @return mixed Callback results
*/
public static function __callStatic($name, $params) {
$app = Flight::app();
return \flight\core\Dispatcher::invokeMethod(array($app, $name), $params);
}
/**
* @return object Application instance
*/
public static function app() {
static $initialized = false;
if (!$initialized) {
@ -62,13 +71,6 @@ class Flight {
$initialized = true;
}
return \flight\core\Dispatcher::invokeMethod(array(self::$engine, $name), $params);
}
/**
* @return object Application instance
*/
public static function app() {
return self::$engine;
}
}

Loading…
Cancel
Save