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
This commit is contained in:
Bharat Mediratta
2009-01-14 04:12:02 +00:00
parent 02af2d8b76
commit f3ba69c1d6
59 changed files with 280 additions and 257 deletions
+4 -4
View File
@@ -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));
}
}