From 995448219432e0237d09133977f2e6fc50a77309 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 27 Feb 2012 16:27:28 -0600 Subject: [PATCH] added search and extension functions to view class for registering them. Signed-off-by: Taylor Otwell --- laravel/view.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/laravel/view.php b/laravel/view.php index ca966fdc..205129d9 100644 --- a/laravel/view.php +++ b/laravel/view.php @@ -211,6 +211,31 @@ public static function composer($view, $composer) Event::listen("laravel.composing: {$view}", $composer); } + /** + * Register a new root path for a bundle. + * + * @param string $bundle + * @param string $path + * @return void + */ + public static function search($bundle, $path) + { + static::$paths[$bundle][] = $path; + } + + /** + * Register a new valid view extension. + * + * @param string $extension + * @return void + */ + public static function extension($extension) + { + static::$extensions[] = $extension; + + static::$extensions = array_unique(static::$extensions); + } + /** * Get the evaluated string content of the view. *