* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace ApiPlatform\Operation; /** * Generates a path name according to a string and whether it's a collection or not. * * @author Antoine Bluchet */ interface PathSegmentNameGeneratorInterface { /** * Transforms a given string to a valid path name which can be pluralized (eg. for collections). * * @param string $name usually a ResourceMetadata shortname * * @return string A string that is a part of the route name */ public function getSegmentName(string $name, bool $collection = true): string; }