Added method to get the application object instance.

pull/120/head
Mike Cao 11 years ago
parent bd0c947455
commit b10b294d83

@ -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

@ -1 +1 @@
1.1.6
1.1.7

@ -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);

@ -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;
}
}

Loading…
Cancel
Save