StrategyEnabledInterface.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * Zend Framework (http://framework.zend.com/)
  4. *
  5. * @link http://github.com/zendframework/zf2 for the canonical source repository
  6. * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
  7. * @license http://framework.zend.com/license/new-bsd New BSD License
  8. */
  9. namespace Zend\Stdlib\Hydrator;
  10. use Zend\Stdlib\Hydrator\Strategy\StrategyInterface;
  11. interface StrategyEnabledInterface
  12. {
  13. /**
  14. * Adds the given strategy under the given name.
  15. *
  16. * @param string $name The name of the strategy to register.
  17. * @param StrategyInterface $strategy The strategy to register.
  18. * @return StrategyEnabledInterface
  19. */
  20. public function addStrategy($name, StrategyInterface $strategy);
  21. /**
  22. * Gets the strategy with the given name.
  23. *
  24. * @param string $name The name of the strategy to get.
  25. * @return StrategyInterface
  26. */
  27. public function getStrategy($name);
  28. /**
  29. * Checks if the strategy with the given name exists.
  30. *
  31. * @param string $name The name of the strategy to check for.
  32. * @return bool
  33. */
  34. public function hasStrategy($name);
  35. /**
  36. * Removes the strategy with the given name.
  37. *
  38. * @param string $name The name of the strategy to remove.
  39. * @return StrategyEnabledInterface
  40. */
  41. public function removeStrategy($name);
  42. }