Refactor the view class to use protected instead of private.

This commit is contained in:
Taylor Otwell 2011-08-08 16:52:10 -05:00
parent 22676ccee0
commit 512342c0db
1 changed files with 7 additions and 9 deletions

View File

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