Skip to content

Commit

Permalink
Framework: auto convert config value type
Browse files Browse the repository at this point in the history
  • Loading branch information
PeratX committed Jan 29, 2019
1 parent fe02641 commit 7d7beb9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/iTXTech/SimpleFramework/Framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@ private function processCommandLineOptions(array $argv){
if($cmd->hasOption("config")){
foreach($cmd->getOptionValues("config") as $value){
list($k, $v) = explode("=", $value, 2);
if(strtolower($v) == "false"){
$v = false;
}elseif(strtolower($v) == "true"){
$v = true;
}
if(StringUtil::contains($k, ".")){
list($k1, $k2) = explode(".", $k);
$this->properties->config[$k1][$k2] = $v;
Expand Down

0 comments on commit 7d7beb9

Please sign in to comment.