Created
November 8, 2014 23:19
-
-
Save adarwash/1b13b94775b317d8e373 to your computer and use it in GitHub Desktop.
Added comments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Config { | |
//$path is the value that going to be pass thought for exmaple Config::get('mysql/host') the part 'mysql/host' will be the path. | |
public static function get($path = null){ | |
if($path) { | |
//$config make it easier to write $GLOBALS['config']; | |
$config = $GLOBALS['config']; | |
// Explode will read value my parts and the / for example mysql/host mysql is first part and mysql is the seconned part. | |
$path = explode('/', $path); | |
} | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment