Skip to content

Commit

Permalink
Remove prefix from variable and update document
Browse files Browse the repository at this point in the history
  • Loading branch information
ajmerainfo committed Oct 13, 2015
1 parent 0367da7 commit d22cc75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@ You can call variable like below in PHP code
```php
<?php

// [File Name]_[Variable Name]

echo CONFIG_DB_NAME;
echo DB_NAME;
// output: test_database

echo API_KEY;
// output: sdfds6549sdf7SDFD@#$55

```

You can use comment by hash`#` or dash`-` sign.
You can use comment by start with hash`#` or dash`-` sign.

-----

Expand Down
2 changes: 1 addition & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected function setConfigVariable($path)

// set variable from config file
foreach ($configList as $key => $value) {
define(strtoupper(trim($this->file, '.')).'_'.$key, $value);
define($key, $value);
}
}
}

0 comments on commit d22cc75

Please sign in to comment.