You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
777 B

  1. <?php
  2. /*
  3. * This file is part of the overtrue/pinyin.
  4. *
  5. * (c) overtrue <i@overtrue.me>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace Overtrue\Pinyin;
  11. use Closure;
  12. /**
  13. * Dict loader interface.
  14. */
  15. interface DictLoaderInterface
  16. {
  17. /**
  18. * Load dict.
  19. *
  20. * <pre>
  21. * [
  22. * '响应时间' => "[\t]xiǎng[\t]yìng[\t]shí[\t]jiān",
  23. * '长篇连载' => '[\t]cháng[\t]piān[\t]lián[\t]zǎi',
  24. * //...
  25. * ]
  26. * </pre>
  27. *
  28. * @param Closure $callback
  29. */
  30. public function map(Closure $callback);
  31. /**
  32. * Load surname dict.
  33. *
  34. * @param Closure $callback
  35. */
  36. public function mapSurname(Closure $callback);
  37. }