Ejemplo n.º 1
0
 public function toDebug()
 {
     $out = '';
     foreach ($this->_parts as $type => $p) {
         if (is_array($p)) {
             $out .= "\n";
             $out .= "{$type} => array(\n";
             foreach ($p as $k => $i) {
                 $out .= '    ';
                 if ($i instanceof Kwf_Model_Select_Expr_Interface) {
                     if (!is_int($k)) {
                         $out .= $k . ' => ';
                     }
                     $out .= _pArray($i, '    ');
                 } else {
                     $out .= $k . ' => ' . Kwf_Debug::_btArgString($i);
                 }
                 $out .= ",\n";
             }
             $out .= "),\n";
         } else {
             $out .= "\n";
             $out .= "{$type} => " . Kwf_Debug::_btArgString($p) . ", ";
         }
     }
     $out = trim($out, ', ');
     $ret = '<pre>' . get_class($this) . '(' . $out . "\n)</pre>";
     return $ret;
 }