/** * Verifies if view file exists * @param string $view_path String containing the view path * @return mixed The full view path if view was found, null otherwise */ private function view_exists($view_path) { $result = null; // Look for a custom path if (file_exists($path = $view_path . BLADE_EXT)) { $result = 'path: ' . $path; } if (file_exists($path = $view_path . EXT)) { $result = 'path: ' . $path; } // We still can't find this view // lets look for a bundle view // or application folder view if ($result == null) { $view_path = View::exists($view_path, true); if ($view_path) { $result = 'path: ' . $view_path; } } return $result; }