veka-server / config
Une classe de gestion de fichier de config
0.2.2
2017-11-07 19:47 UTC
This package is auto-updated.
Last update: 2025-03-26 21:29:57 UTC
README
Une classe de gestion de fichier de configuration pour mon framework
Utilisation
Initialisation au plus tôt dans le code
// initialise le singleton de configuration \VekaServer\Config\Config::getInstance(__DIR__.'/config/config.php');
Recuperation d'une valeur
\VekaServer\Config\Config::getInstance()->getSetting('db_pass');
ou
\VekaServer\Config\Config::getInstance()->get('db_pass');
Exemple de fichier de config
<?php return array( // Environnement "ENV" => 'DEV', // DEV / PROD // BDD "db_user" => 'root', "db_pass" => 'root', "db_host" => 'localhost', "db_name" => 'mabase' );