Skip to content
This repository has been archived by the owner on Dec 18, 2020. It is now read-only.

Latest commit

 

History

History
45 lines (25 loc) · 764 Bytes

README.md

File metadata and controls

45 lines (25 loc) · 764 Bytes

Php basit ayar class'i

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');