From 0baf5ad9b162987c313a8615f824192d4fab6a1f Mon Sep 17 00:00:00 2001 From: Phill Sparks Date: Fri, 4 May 2012 12:35:24 +0100 Subject: [PATCH] Fix View's use of Events so you can actually implement your own things Signed-off-by: Phill Sparks --- laravel/blade.php | 2 +- laravel/event.php | 2 +- laravel/view.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/laravel/blade.php b/laravel/blade.php index d1639929..5e71d8b8 100644 --- a/laravel/blade.php +++ b/laravel/blade.php @@ -42,7 +42,7 @@ public static function sharpen() // return false so the View can be rendered as normal. if ( ! str_contains($view->path, BLADE_EXT)) { - return false; + return; } $compiled = path('storage').'views/'.md5($view->path); diff --git a/laravel/event.php b/laravel/event.php index f5277da1..77442238 100644 --- a/laravel/event.php +++ b/laravel/event.php @@ -151,7 +151,7 @@ public static function fire($events, $parameters = array(), $halt = false) } } - return $responses; + return $halt ? null : $responses; } } \ No newline at end of file diff --git a/laravel/view.php b/laravel/view.php index 8a9955dd..f97b3dee 100644 --- a/laravel/view.php +++ b/laravel/view.php @@ -125,7 +125,7 @@ public static function exists($view, $return_path = false) // We delegate the determination of view paths to the view loader event // so that the developer is free to override and manage the loading // of views in any way they see fit for their application. - $path = Event::first(static::loader, array($bundle, $view)); + $path = Event::until(static::loader, array($bundle, $view)); if ( ! is_null($path)) { @@ -322,9 +322,9 @@ public function render() // allows easy attachment of other view parsers. if (Event::listeners(static::engine)) { - $result = Event::first(static::engine, array($this)); + $result = Event::until(static::engine, array($this)); - if ($result !== false) return $result; + if ( ! is_null($result)) return $result; } return $this->get();