Beispiel #1
0
 public function __clone()
 {
     $newOp = new LogootPlusDel(clone $this->mLogootPosition, $this->mLineContent);
     if ($this->isInv) {
         $newOp->setInv();
     }
     return $newOp;
 }
Beispiel #2
0
 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;
 }