AnalyzerInterface.php 564 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2014 Carsten Brandt
  4. * @license https://github.com/cebe/js-search/blob/master/LICENSE
  5. * @link https://github.com/cebe/js-search#readme
  6. */
  7. namespace cebe\jssearch;
  8. /**
  9. * Interface for all Tokenizers.
  10. *
  11. * @author Carsten Brandt <mail@cebe.cc>
  12. */
  13. interface AnalyzerInterface
  14. {
  15. /**
  16. * Analyzes a string and returns an array of the following format:
  17. *
  18. * TODO
  19. * ```
  20. * ```
  21. *
  22. * @param string $string the string to analyze
  23. * @return array
  24. */
  25. public function analyze($string, TokenizerInterface $tokenizer);
  26. }