Beispiel #1
0
 /**
  * Check Object acceptance
  *
  * Check if given Object is acceptable in Application Chain
  * To be valid, the Object must implement Next\Application\Application
  *
  * @param Next\Components\Object $object
  *   An Object object
  *
  *   The checking for Next\Application\Application implementation
  *   will be done inside the method.
  *
  * @return boolean
  *   TRUE if given Object is acceptable by Application Collection and FALSE otherwise
  *
  * @throws Next\Application\ApplicationException
  *   Given application is not acceptable in Application Chain
  */
 protected function accept(Object $object)
 {
     if (!$object instanceof Application) {
         throw ApplicationException::invalidApplication($object);
     }
     return TRUE;
 }
 /**
  * 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();
     }
 }