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.

33 lines
905 B

3 years ago
  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\String\Inflector;
  11. interface InflectorInterface
  12. {
  13. /**
  14. * Returns the singular forms of a string.
  15. *
  16. * If the method can't determine the form with certainty, several possible singulars are returned.
  17. *
  18. * @return string[] An array of possible singular forms
  19. */
  20. public function singularize(string $plural): array;
  21. /**
  22. * Returns the plural forms of a string.
  23. *
  24. * If the method can't determine the form with certainty, several possible plurals are returned.
  25. *
  26. * @return string[] An array of possible plural forms
  27. */
  28. public function pluralize(string $singular): array;
  29. }