Ejemplo n.º 1
0
 /**
  * Extracts view model data into the current scope and includes the view resource.
  *
  * @param ViewModelInterface $__
  * @return string
  *
  * @throws ResourceNotFoundException When the view resource does not exist.
  */
 private function performInclude(ViewModelInterface $__)
 {
     $___ = $this->resolveResourcePath($__->getResource());
     if (!is_file($___)) {
         throw new \OutOfBoundsException(sprintf('View resource not found: "%s"', $___));
     }
     ob_start();
     try {
         extract($__->toArray(), EXTR_SKIP);
         include $___;
         return ob_get_clean();
     } catch (\Exception $e) {
         ob_end_clean();
         throw $e;
     }
 }