protected function walkArray($input) { if (!Inspekt::isArrayOrArrayObject($input)) { throw new Exception('$input must be an array or ArrayObject'); } foreach ($input as $key => $val) { if (Inspekt::isArrayOrArrayObject($val)) { $input[$key] = $this->walkArray($val); } else { $val = $this->inspekt($val); $input[$key] = $val; } } return $input; }