Skip to content

Instantly share code, notes, and snippets.

@adarwash
Created November 8, 2014 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adarwash/1b13b94775b317d8e373 to your computer and use it in GitHub Desktop.
Save adarwash/1b13b94775b317d8e373 to your computer and use it in GitHub Desktop.
Added comments
<?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