public static function load_options() { if (self::$options == null) { $theme = Kohana::config('filebrowser.theme'); $options_file = Kohana::find_file('views/../../../config/themes/' . $theme . '/', 'options', false, 'yml'); if ($options_file) { $array = Spyc::YAMLLoad($options_file); self::$options = $array; if (isset($array['color_palette'])) { $colors_file = Kohana::find_file('views/../../../config/themes/' . $theme . '/colors/', $array['color_palette'], false, 'yml'); if ($colors_file) { $colors_array = Spyc::YAMLLoad($colors_file); self::$colors = $colors_array; } else { self::$colors = array(); } } } else { self::$options = array(); } } }