Merge pull request #623 from sparksp/develop-patch-view

Fix View's use of Events so you can actually implement your own things
This commit is contained in:
Taylor Otwell 2012-05-04 06:57:24 -07:00
commit 6923b7c95d
3 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -151,7 +151,7 @@ public static function fire($events, $parameters = array(), $halt = false)
}
}
return $responses;
return $halt ? null : $responses;
}
}

View File

@ -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();