added search and extension functions to view class for registering them.

Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
This commit is contained in:
Taylor Otwell 2012-02-27 16:27:28 -06:00
parent 990f8d4adc
commit 9954482194
1 changed files with 25 additions and 0 deletions

View File

@ -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.
*