コード例 #1
0
ファイル: Coopy.class.php プロジェクト: paulfitz/daff-php
 public function runDiff($parent, $a, $b, $flags, $output)
 {
     $ct = coopy_Coopy::compareTables3($parent, $a, $b, $flags);
     $align = $ct->align();
     $td = new coopy_TableDiff($align, $flags);
     $o = new coopy_SimpleTable(0, 0);
     $os = new coopy_Tables($o);
     $td->hiliteWithNesting($os);
     $use_color = $flags->terminal_format === "ansi";
     if ($flags->terminal_format === null) {
         if (($output === null || $output === "-") && ($this->output_format === "copy" || $this->output_format === "csv")) {
             if ($this->io !== null) {
                 if ($this->io->isTtyKnown()) {
                     $use_color = $this->io->isTty();
                 }
             }
         }
     }
     $this->saveTables($output, $os, $use_color);
 }