Base.php 815 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * The original PHP version of this code was written by Geoffrey T. Dairiki
  4. * <dairiki@dairiki.org>, and is used/adapted with his permission.
  5. *
  6. * Copyright 2004 Geoffrey T. Dairiki <dairiki@dairiki.org>
  7. * Copyright 2004-2012 Horde LLC (http://www.horde.org/)
  8. *
  9. * See the enclosed file COPYING for license information (LGPL). If you did
  10. * not receive this file, see http://www.horde.org/licenses/lgpl21.
  11. *
  12. * @package Text_Diff
  13. * @author Geoffrey T. Dairiki <dairiki@dairiki.org>
  14. */
  15. abstract class Horde_Text_Diff_Op_Base
  16. {
  17. public $orig;
  18. public $final;
  19. abstract public function reverse();
  20. public function norig()
  21. {
  22. return $this->orig ? count($this->orig) : 0;
  23. }
  24. public function nfinal()
  25. {
  26. return $this->final ? count($this->final) : 0;
  27. }
  28. }