Commit b870807e authored by Dayle Rees's avatar Dayle Rees

renamed blade::register to blade::extend

Signed-off-by: 's avatarDayle Rees <thepunkfan@gmail.com>
parent d2de301e
...@@ -26,7 +26,7 @@ class Blade { ...@@ -26,7 +26,7 @@ class Blade {
'yield_sections', 'yield_sections',
'section_start', 'section_start',
'section_end', 'section_end',
'extra', 'extensions',
); );
/** /**
...@@ -34,7 +34,7 @@ class Blade { ...@@ -34,7 +34,7 @@ class Blade {
* *
* @var array * @var array
*/ */
protected static $registered = array(); protected static $extensions = array();
/** /**
* Register the Blade view engine with Laravel. * Register the Blade view engine with Laravel.
...@@ -76,16 +76,16 @@ class Blade { ...@@ -76,16 +76,16 @@ class Blade {
* Register a new blade compiler. * Register a new blade compiler.
* *
* <code> * <code>
* Blade::register(function($view) { * Blade::extend(function($view) {
* return str_replace('thing', 'another_thing', $view); * return str_replace('thing', 'another_thing', $view);
* }); * });
* </code> * </code>
* *
* @param closure $compiler * @param closure $compiler
*/ */
public static function register($compiler) public static function extend($compiler)
{ {
static::$registered[] = $compiler; static::$extensions[] = $compiler;
} }
/** /**
...@@ -416,9 +416,9 @@ class Blade { ...@@ -416,9 +416,9 @@ class Blade {
* @param string $value * @param string $value
* @return string * @return string
*/ */
protected static function compile_extra($value) protected static function compile_extensions($value)
{ {
foreach (static::$registered as $compiler) foreach (static::$extensions as $compiler)
{ {
$value = $compiler($value); $value = $compiler($value);
} }
......
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