* @package Mammut\Documents */ class DiffOps extends \Mammut\Object { public function appendOpcode($opcode, $from, $from_offset, $from_len) { if ( $opcode === 'c' ) { $edits[] = new DiffCopyOp($from_len); } else if ( $opcode === 'd' ) { $edits[] = new DiffDeleteOp($from_len); } else /* if ( $opcode === 'i' ) */ { $edits[] = new DiffInsertOp(substr($from, $from_offset, $from_len)); } } public $edits = array(); }