/** * a static method to get variables * * @param Ai1ec_Db_Adapter $db_adapter * @return array */ public static function get_saved_variables(Ai1ec_Db_Adapter $db_adapter) { $variables = $db_adapter->get_data_from_config(self::DB_KEY_FOR_LESS_VARIABLES); $variables_with_description = self::get_less_variable_data_from_config_file(Ai1ec_Less_Factory::create_less_file_instance(Ai1ec_Less_File::USER_VARIABLES_FILE)); // Add the description at runtime so that it can get the translation foreach ($variables as $name => $attrs) { if (isset($variables_with_description[$name]['description'])) { $variables[$name]['description'] = $variables_with_description[$name]['description']; } } return $variables; }
/** * (non-PHPdoc) * @see Ai1ec_Write_Data_To_Cache::delete_data() */ public function delete_data($key) { return $this->db_adapter->delete_data_from_config($key); }