/** * Check Application Integrity * * @throws Next\Application\ApplicationException * Application has no View Engine assigned * * @throws Next\Application\ApplicationException * Assigned View Engine is invalid over interface implementing check */ private function checkIntegrity() { // Checking if we have some View Engine Registered if (is_null($this->view)) { throw ApplicationException::noViewEngine($this); } // Checking if assigned View Engine is Valid if (!$this->view instanceof View) { throw ApplicationException::invalidViewEngine(); } }