菜谱项目

ExtractorInterface.php 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Translation\Extractor;
  11. use Symfony\Component\Translation\MessageCatalogue;
  12. /**
  13. * Extracts translation messages from a directory or files to the catalogue.
  14. * New found messages are injected to the catalogue using the prefix.
  15. *
  16. * @author Michel Salib <michelsalib@hotmail.com>
  17. */
  18. interface ExtractorInterface
  19. {
  20. /**
  21. * Extracts translation messages from files, a file or a directory to the catalogue.
  22. *
  23. * @param string|array $resource Files, a file or a directory
  24. * @param MessageCatalogue $catalogue The catalogue
  25. */
  26. public function extract($resource, MessageCatalogue $catalogue);
  27. /**
  28. * Sets the prefix that should be used for new found messages.
  29. *
  30. * @param string $prefix The prefix
  31. */
  32. public function setPrefix($prefix);
  33. }