OperationInterface.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /*
  3. * This file is part of Composer.
  4. *
  5. * (c) Nils Adermann <naderman@naderman.de>
  6. * Jordi Boggiano <j.boggiano@seld.be>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Composer\DependencyResolver\Operation;
  12. /**
  13. * Solver operation interface.
  14. *
  15. * @author Konstantin Kudryashov <ever.zet@gmail.com>
  16. */
  17. interface OperationInterface
  18. {
  19. /**
  20. * Returns operation type.
  21. *
  22. * @return string
  23. */
  24. public function getOperationType();
  25. /**
  26. * Returns operation reason.
  27. *
  28. * @return string
  29. */
  30. public function getReason();
  31. /**
  32. * Serializes the operation in a human readable format
  33. *
  34. * @param $lock bool Whether this is an operation on the lock file
  35. * @return string
  36. */
  37. public function show($lock);
  38. /**
  39. * Serializes the operation in a human readable format
  40. *
  41. * @return string
  42. */
  43. public function __toString();
  44. }