for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the PHPoole package.
*
* Copyright (c) Arnaud Ligny <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPoole\Command;
class Config extends AbstractCommand
{
public function processCommand()
try {
$this->wl($this->printArray($this->getPHPoole()->getConfig()->getAllAsArray()));
} catch (\Exception $e) {
throw new \Exception(sprintf($e->getMessage()));
}
private function printArray($array, $i = -4)
$return = '';
if (is_array($array)) {
$i += 4;
foreach ($array as $key=>$val) {
if (is_array($val)) {
$return .= str_repeat(' ', $i)."$key:\n".$this->printArray($val, $i);
} else {
$return .= str_repeat(' ', $i)."$key: $val\n";
return $return;