コード例 #1
0
 /**
  *
  * @see Ai1ec_Get_Data_From_Cache::get_data()
  *
  */
 public function get_data($key)
 {
     $data = $this->db_adapter->get_data_from_config($key);
     if (false === $data) {
         throw new Ai1ec_Cache_Not_Set_Exception();
     }
     return $data;
 }
 /**
  * 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;
 }