32,9 → 32,16 |
// Chargement de la configuration |
self::$config = parse_ini_file($fichier_ini, TRUE); |
|
// Paramêtres de config dynamiques |
self::$config['chemins']['baseURLAbsoluDyn'] = 'http://'.$_SERVER['SERVER_NAME'].self::$config['chemins']['baseURL'].'%s'; |
|
// Gestion de la mémoire maximum allouée aux services |
ini_set('memory_limit', self::$config['parametres']['limiteMemoire']); |
|
// Réglages de PHP |
setlocale(LC_ALL, self::$config['parametres']['locale']); |
date_default_timezone_set(self::$config['parametres']['fuseauHoraire']); |
|
// Gestion des erreurs |
error_reporting(self::$config['parametres']['erreurNiveau']); |
|
61,7 → 68,7 |
} else { |
$len = -(strlen($_SERVER['QUERY_STRING']) + 1); |
} |
$url = substr($_SERVER['REQUEST_URI'], strlen(self::$config['parametres']['baseURL']), $len); |
$url = substr($_SERVER['REQUEST_URI'], strlen(self::$config['chemins']['baseURL']), $len); |
$url_morceaux = explode('/', $url); |
return $url_morceaux; |
} |
92,7 → 99,7 |
return null; |
} |
|
$chemins = array('', self::$config['parametres']['bibliothequeDossier']); |
$chemins = array('', self::$config['chemins']['bibliothequeDossier']); |
foreach ($chemins as $chemin) { |
$chemin = $chemin.$classe.'.php'; |
if (file_exists($chemin)) { |
108,7 → 115,7 |
function executer() { |
if (!is_null($this->widget)) { |
$classe_widget = ucfirst($this->widget); |
$fichier_widget = self::$config['parametres']['widgetDossier'].strtolower($this->widget).DIRECTORY_SEPARATOR.$classe_widget.'.php'; |
$fichier_widget = self::$config['chemins']['widgetDossier'].strtolower($this->widget).DIRECTORY_SEPARATOR.$classe_widget.'.php'; |
if (file_exists($fichier_widget)) { |
include_once $fichier_widget; |
if (class_exists($classe_widget)) { |