diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-01-14 04:12:02 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-01-14 04:12:02 +0000 |
commit | f3ba69c1d67c425ffa180d082a373e5cce0c86ce (patch) | |
tree | 5ecbbe0ba96a94e3f4aadd26042c8ad1a32ef1bc /core/helpers/theme.php | |
parent | 02af2d8b7639fdc18fba3d69a4ca0a3f5c92b948 (diff) |
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
Diffstat (limited to 'core/helpers/theme.php')
-rw-r--r-- | core/helpers/theme.php | 8 |
1 files changed, 4 insertions, 4 deletions
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)); } } |