diff --git a/README.md b/README.md index 9e4d1ab..711ace6 100644 --- a/README.md +++ b/README.md @@ -816,6 +816,7 @@ Flight::set($key, $value) // Sets a variable. Flight::has($key) // Checks if a variable is set. Flight::clear([$key]) // Clears a variable. Flight::init() // Initializes the framework to its default settings. +Flight::app() // Gets the application object instance ``` ## Extensible Methods diff --git a/VERSION b/VERSION index 0664a8f..2bf1ca5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.6 +1.1.7 diff --git a/flight/Engine.php b/flight/Engine.php index d7f69db..ebf374f 100644 --- a/flight/Engine.php +++ b/flight/Engine.php @@ -55,6 +55,7 @@ class Engine { * * @param string $name Method name * @param array $params Method parameters + * @return mixed Callback results */ public function __call($name, $params) { $callback = $this->dispatcher->get($name); diff --git a/flight/Flight.php b/flight/Flight.php index 5cbfff6..951ba64 100644 --- a/flight/Flight.php +++ b/flight/Flight.php @@ -42,5 +42,11 @@ class Flight { return \flight\core\Dispatcher::invokeMethod(array(self::$engine, $name), $params); } -} + /** + * @return object Application instance + */ + public static function app() { + return self::$engine; + } +}