refactored welcome pages.

This commit is contained in:
Taylor Otwell
2011-10-11 21:27:16 -05:00
parent d07714936f
commit 7317b5857b
15 changed files with 311 additions and 309 deletions

View File

@@ -59,7 +59,14 @@ class View {
foreach (array(EXT, BLADE_EXT) as $extension)
{
if (file_exists($path = VIEW_PATH.$view.$extension)) return $path;
if (file_exists($path = VIEW_PATH.$view.$extension))
{
return $path;
}
elseif (file_exists($path = SYS_VIEW_PATH.$view.$extension))
{
return $path;
}
}
throw new \Exception("View [$view] does not exist.");
@@ -145,10 +152,6 @@ class View {
{
if (is_null(static::$composers)) static::$composers = require APP_PATH.'composers'.EXT;
// The shared composer is called for every view instance. This allows the
// convenient binding of global view data or partials within a single method.
if (isset(static::$composers['shared'])) call_user_func(static::$composers['shared'], $view);
if (isset(static::$composers[$view->view]))
{
foreach ((array) static::$composers[$view->view] as $key => $value)