/** * Gets the application instance. * * @return Application */ public function getApp() { if (!$this->app) { return Application::getDefault(); } return $this->app; }