Example #1
0
 private function aIter($array, $deep = 0, $out_object = false)
 {
     $ret_str = 'Array (' . count($array) . ")\r\n(\r\n";
     $format_handler = new out_format($this->config());
     foreach ($array as $key => $val) {
         $ret_str .= "\t[" . $key . '] => ';
         if (is_object($val)) {
             $ret_str .= trim($format_handler->indent($this->indent, $this->outObject($val, $out_object)));
         } else {
             if (is_array($val)) {
                 $ret_str .= trim($format_handler->indent($this->indent, $this->aIter($val, $deep + 1, $out_object)));
             } else {
                 $ret_arg = new self('', $val);
                 $ret_str .= $ret_arg->defaultValue();
             }
         }
         //if/else
         $ret_str .= "\r\n";
     }
     //method
     $prefix = str_repeat($this->indent, $deep > 1 ? 1 : $deep);
     return trim($format_handler->indent($prefix, $ret_str . ')')) . "\r\n";
 }