Commit 99544821 by Taylor Otwell

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

Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
parent 990f8d4a
......@@ -212,6 +212,31 @@ class View implements ArrayAccess {
}
/**
* 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.
*
* @return string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment