TYPO3  7.6
Delete.php
Go to the documentation of this file.
1 <?php
2 
19 namespace cogpowered\FineDiff\Parser\Operations;
20 
24 class Delete implements OperationInterface
25 {
31  public function __construct($len)
32  {
33  $this->fromLen = $len;
34  }
35 
39  public function getFromLen()
40  {
41  return $this->fromLen;
42  }
43 
47  public function getToLen()
48  {
49  return 0;
50  }
51 
55  public function getOpcode()
56  {
57  if ($this->fromLen === 1) {
58  return 'd';
59  }
60 
61  return "d{$this->fromLen}";
62  }
63 }