Commit 512342c0 authored by Taylor Otwell's avatar Taylor Otwell

Refactor the view class to use protected instead of private.

parent 22676cce
...@@ -35,14 +35,14 @@ class View { ...@@ -35,14 +35,14 @@ class View {
* *
* @var array * @var array
*/ */
private static $composers; protected static $composers;
/** /**
* The defined view names. * The defined view names.
* *
* @var array * @var array
*/ */
private static $names; protected static $names;
/** /**
* Create a new view instance. * Create a new view instance.
...@@ -83,11 +83,9 @@ class View { ...@@ -83,11 +83,9 @@ class View {
* @param array $data * @param array $data
* @return View * @return View
*/ */
private static function of($name, $data = array()) protected static function of($name, $data = array())
{ {
$modules = array_unique(array_merge(array(ACTIVE_MODULE, 'application'), Config::get('application.modules'))); foreach (array_unique(array_merge(array(ACTIVE_MODULE, 'application'), Config::get('application.modules'))) as $module)
foreach ($modules as $module)
{ {
static::load_composers($module); static::load_composers($module);
...@@ -109,7 +107,7 @@ class View { ...@@ -109,7 +107,7 @@ class View {
* @param string $view * @param string $view
* @return array * @return array
*/ */
private static function parse($view) protected static function parse($view)
{ {
$module = (strpos($view, '::') !== false) ? substr($view, 0, strpos($view, ':')) : 'application'; $module = (strpos($view, '::') !== false) ? substr($view, 0, strpos($view, ':')) : 'application';
...@@ -128,7 +126,7 @@ class View { ...@@ -128,7 +126,7 @@ class View {
* *
* @return void * @return void
*/ */
private function compose() protected function compose()
{ {
static::load_composers($this->module); static::load_composers($this->module);
...@@ -147,7 +145,7 @@ class View { ...@@ -147,7 +145,7 @@ class View {
* @param string $module * @param string $module
* @return void * @return void
*/ */
private static function load_composers($module) protected static function load_composers($module)
{ {
if (isset(static::$composers[$module])) return; if (isset(static::$composers[$module])) return;
......
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