You are here

function Config_File::get_section_names in Quiz 6.6

Same name and namespace in other branches
  1. 6.5 includes/moodle/lib/smarty/Config_File.class.php \Config_File::get_section_names()

Get all section names from a loaded file.

Parameters

string $file_name config file to get section names from:

Return value

array an array of section names from the specified file

File

includes/moodle/lib/smarty/Config_File.class.php, line 171

Class

Config_File
Config file reading class @package Smarty

Code

function get_section_names($file_name) {
  $file_name = $this->_config_path . $file_name;
  if (!isset($this->_config_data[$file_name])) {
    $this
      ->_trigger_error_msg("Unknown config file '{$file_name}'");
    return;
  }
  return array_keys($this->_config_data[$file_name]["sections"]);
}