StrategyInterface.php 962 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\App\View\Asset\MaterializationStrategy;
  7. use Magento\Framework\Filesystem\Directory\WriteInterface;
  8. use Magento\Framework\View\Asset;
  9. /**
  10. * Interface \Magento\Framework\App\View\Asset\MaterializationStrategy\StrategyInterface
  11. *
  12. */
  13. interface StrategyInterface
  14. {
  15. /**
  16. * Publish file
  17. *
  18. * @param WriteInterface $sourceDir
  19. * @param WriteInterface $targetDir
  20. * @param string $sourcePath
  21. * @param string $destinationPath
  22. * @return bool
  23. */
  24. public function publishFile(
  25. WriteInterface $sourceDir,
  26. WriteInterface $targetDir,
  27. $sourcePath,
  28. $destinationPath
  29. );
  30. /**
  31. * Whether the strategy can be applied
  32. *
  33. * @param Asset\LocalInterface $asset
  34. * @return bool
  35. */
  36. public function isSupported(Asset\LocalInterface $asset);
  37. }