You are here

function Config_File::set_path in Quiz 6.6

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

Set the path where configuration files can be found.

Parameters

string $config_path path to the config files:

1 call to Config_File::set_path()
Config_File::Config_File in includes/moodle/lib/smarty/Config_File.class.php
Constructs a new config file class.

File

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

Class

Config_File
Config file reading class @package Smarty

Code

function set_path($config_path) {
  if (!empty($config_path)) {
    if (!is_string($config_path) || !file_exists($config_path) || !is_dir($config_path)) {
      $this
        ->_trigger_error_msg("Bad config file path '{$config_path}'");
      return;
    }
    if (substr($config_path, -1) != DIRECTORY_SEPARATOR) {
      $config_path .= DIRECTORY_SEPARATOR;
    }
    $this->_config_path = $config_path;
  }
}