From f3ba69c1d67c425ffa180d082a373e5cce0c86ce Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 14 Jan 2009 04:12:02 +0000 Subject: Make sure that helper functions are all static. Add new File_Structure_Test to make sure we don't regress. According to the PHP docs, the "public" keyword is implied on static functions, so remove it. Also, require private static functions to start with an _. http://php.net/manual/en/language.oop5.visibility.php --- core/helpers/theme.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/helpers/theme.php') diff --git a/core/helpers/theme.php b/core/helpers/theme.php index 8f977e0c..74a41459 100644 --- a/core/helpers/theme.php +++ b/core/helpers/theme.php @@ -28,7 +28,7 @@ class theme_Core { * Load the active theme. This is called at bootstrap time. We will only ever have one theme * active for any given request. */ - public static function load_themes() { + static function load_themes() { $modules = Kohana::config('core.modules'); if (Router::$controller == "admin") { array_unshift($modules, THEMEPATH . 'admin_default'); @@ -38,7 +38,7 @@ class theme_Core { Kohana::config_set('core.modules', $modules); } - public static function get_edit_form_admin($theme) { + static function get_edit_form_admin($theme) { $form = new Forge("admin/themes/edit/{$theme->id}", '', null, array("id" =>"gThemeDetailsForm")); $group = $form->group("edit_theme")->label($theme->description); @@ -55,12 +55,12 @@ class theme_Core { return $form; } - public static function get_edit_form_content($theme_name) { + static function get_edit_form_content($theme_name) { $file = THEMEPATH . $theme_name . "/theme.info"; $theme_info = new ArrayObject(parse_ini_file($file), ArrayObject::ARRAY_AS_PROPS); } - public static function get_var($theme_id, $name, $default_value = null) { + static function get_var($theme_id, $name, $default_value = null) { return module::get_var($theme_id, $name, module::get_var("core", $name, $default_value)); } } -- cgit v1.2.3