Skip to content

Muradg/SimParse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimParse

##Example

Firstly, we need to create a folder to store configurations. Then, when we initialize the object, the first parameter is passed the directory where the files will be stored configurations. The second parameter, specify a file type. (Default php)

	$config = new SimParse\Config('configs', 'php');

When an object is created, we can expand the library by adding your adapters by addAdapter:

	$config->addAdapter('serialize', 'SimParse\Adapters\SerializeAdapter')

To get the data from the file, use the function get(). For example, to retrieve data from configs/config.php file we write the following:

	[
		'mysql' => [
			'host' 	=> 'default',
			'user' 	=> 'default',
			'db' 	=> 'default',
		]
	]

To get the value of db, the code will be as follows:

	$config->get('config.mysql.db');

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages