ValidatorInterface.php 611 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\App\Scope;
  7. use Magento\Framework\Exception\LocalizedException;
  8. /**
  9. * Interface Validator for validating scope and scope code
  10. */
  11. interface ValidatorInterface
  12. {
  13. /**
  14. * Validate if exists given scope and scope code
  15. * otherwise, throws an exception with appropriate message.
  16. *
  17. * @param string $scope
  18. * @param string $scopeCode
  19. * @return boolean
  20. * @throws LocalizedException
  21. */
  22. public function isValid($scope, $scopeCode = null);
  23. }