BundleInterface.php 850 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Deploy\Package;
  7. /**
  8. * Bundle Interface
  9. */
  10. interface BundleInterface
  11. {
  12. /**
  13. * Path relative to package directory where bundle files should be created
  14. */
  15. const BUNDLE_JS_DIR = 'js/bundle';
  16. /**
  17. * Add file that can be bundled
  18. *
  19. * @param string $filePath
  20. * @param string $sourcePath
  21. * @param string $contentType
  22. * @return bool true on success
  23. */
  24. public function addFile($filePath, $sourcePath, $contentType);
  25. /**
  26. * Flushes all files added to appropriate bundle
  27. *
  28. * @return bool true on success
  29. */
  30. public function flush();
  31. /**
  32. * Delete all bundles
  33. *
  34. * @return bool true on success
  35. */
  36. public function clear();
  37. }