theykk / config
simple config class for php
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/theykk/config
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2020-12-19 13:39:49 UTC
README
Kullanim
Yapılandırma çok basit ve kullanımı kolay olacak şekilde tasarlanmıştır. Kullanim methodlari set , get , load , has .
Dosya Tanimlama
Config classi statik olarak load() fonksiyonu ile yuklenebilir , ya da direk Config classi olusturulabilir.
use TheYkk\Config; // Tekli Dosya Yukleme $conf = Config::load('config.php'); $conf = new Config('config.php'); // Coklu dosya yukleme $conf = new Config(['config.php', 'config.php']);
Deger alma
get() methodu kullanarak alma:
// Key kullanarak deger alma $db_user = $conf->get('database.user');
Deger atama
set() ile yapilabilir :
$conf = Config::load('config.php'); $conf->set('genel.durum','oldu');