public function __clone() { $newOp = new LogootPlusDel(clone $this->mLogootPosition, $this->mLineContent); if ($this->isInv) { $newOp->setInv(); } return $newOp; }
public function generate($oldText, $newText) { $patch = parent::generate($oldText, $newText); $opList = array(); foreach ($patch as $op) { if ($op instanceof LogootIns) { $opList[] = LogootPlusIns::plus($op); } elseif ($op instanceof LogootDel) { $opList[] = LogootPlusDel::plus($op); } } $p = new LogootPatch($patch->getId(), $opList); $p->applied(); return $p; }