InflectorInterface.php 835 B

123456789101112131415161718192021222324252627282930313233
  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[]
  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[]
  27. */
  28. public function pluralize(string $singular): array;
  29. }