Improve console/config display
- Add visual distinction between get/set value
This commit is contained in:
parent
796eb1c874
commit
763c66dd49
1 changed files with 6 additions and 6 deletions
|
@ -99,7 +99,7 @@ HELP;
|
||||||
if (count($this->args) == 3) {
|
if (count($this->args) == 3) {
|
||||||
$result = Core\Config::set($this->getArgument(0), $this->getArgument(1), $this->getArgument(2));
|
$result = Core\Config::set($this->getArgument(0), $this->getArgument(1), $this->getArgument(2));
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$this->out("{$this->getArgument(0)}.{$this->getArgument(1)} = " .
|
$this->out("{$this->getArgument(0)}.{$this->getArgument(1)} <= " .
|
||||||
Core\Config::get($this->getArgument(0), $this->getArgument(1)));
|
Core\Config::get($this->getArgument(0), $this->getArgument(1)));
|
||||||
} else {
|
} else {
|
||||||
$this->out("Unable to set {$this->getArgument(0)}.{$this->getArgument(1)}");
|
$this->out("Unable to set {$this->getArgument(0)}.{$this->getArgument(1)}");
|
||||||
|
@ -107,7 +107,7 @@ HELP;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($this->args) == 2) {
|
if (count($this->args) == 2) {
|
||||||
$this->out("{$this->getArgument(0)}.{$this->getArgument(1)} = " .
|
$this->out("{$this->getArgument(0)}.{$this->getArgument(1)} => " .
|
||||||
Core\Config::get($this->getArgument(0), $this->getArgument(1)));
|
Core\Config::get($this->getArgument(0), $this->getArgument(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ HELP;
|
||||||
|
|
||||||
if (!is_null($a->config[$this->getArgument(0)])) {
|
if (!is_null($a->config[$this->getArgument(0)])) {
|
||||||
foreach ($a->config[$this->getArgument(0)] as $k => $x) {
|
foreach ($a->config[$this->getArgument(0)] as $k => $x) {
|
||||||
$this->out("{$this->getArgument(0)}.{$k} = " . $x);
|
$this->out("{$this->getArgument(0)}.{$k} => " . $x);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->out('Config section ' . $this->getArgument(0) . ' returned nothing');
|
$this->out('Config section ' . $this->getArgument(0) . ' returned nothing');
|
||||||
|
@ -135,14 +135,14 @@ HELP;
|
||||||
foreach ($section as $key => $value) {
|
foreach ($section as $key => $value) {
|
||||||
if (is_array($value)) {
|
if (is_array($value)) {
|
||||||
foreach ($value as $k => $v) {
|
foreach ($value as $k => $v) {
|
||||||
$this->out("{$cat}.{$key}[{$k}] = " . $v);
|
$this->out("{$cat}.{$key}[{$k}] => " . $v);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->out("{$cat}.{$key} = " . $value);
|
$this->out("{$cat}.{$key} => " . $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->out("config.{$cat} = " . $section);
|
$this->out("config.{$cat} => " . $section);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue