|
@ -37,18 +37,17 @@ class StringHelper |
|
|
} |
|
|
} |
|
|
else if( is_string($value) ) |
|
|
else if( is_string($value) ) |
|
|
{ |
|
|
{ |
|
|
if( mb_ereg('^[0-9]+$',str_replace('.','',str_replace(' ','',$value))) ) |
|
|
|
|
|
|
|
|
if( count(explode(" ", $value)) != 3 || in_array(false,array_map('is_numeric',explode(" ", $value))) ) |
|
|
{ |
|
|
{ |
|
|
$retStr[] = "{$key} = {$value}"; |
|
|
|
|
|
|
|
|
$retStr[] = "{$key} = \"{$value}\""; |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
$retStr[] = "{$key} = \"{$value}\""; |
|
|
|
|
|
|
|
|
$retStr[] = "{$key} = {$value}"; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else if(is_object($value) && $value instanceof BaseCfg) |
|
|
else if(is_object($value) && $value instanceof BaseCfg) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
foreach( explode("\n", $value->toString()) as $value ) |
|
|
foreach( explode("\n", $value->toString()) as $value ) |
|
|
{ |
|
|
{ |
|
|
if(!empty($value)) |
|
|
if(!empty($value)) |
|
|