PlaceholderInterface.php 1001 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Config\Model\Placeholder;
  7. use Magento\Framework\App\Config\ScopeConfigInterface;
  8. /**
  9. * Interface PlaceholderInterface
  10. * @api
  11. * @since 100.1.2
  12. */
  13. interface PlaceholderInterface
  14. {
  15. /**
  16. * Generating placeholder from value
  17. *
  18. * @param string $path
  19. * @param string $scopeType
  20. * @param string $scopeCode
  21. * @return string
  22. * @since 100.1.2
  23. */
  24. public function generate($path, $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null);
  25. /**
  26. * Restoring path parts from template.
  27. *
  28. * @param string $template
  29. * @return string
  30. * @since 100.1.2
  31. */
  32. public function restore($template);
  33. /**
  34. * Check whether provided string is placeholder
  35. *
  36. * @param string $placeholder
  37. * @return bool
  38. * @since 100.1.2
  39. */
  40. public function isApplicable($placeholder);
  41. }