go1com / util_url
There is no license information available for the latest version (dev-main) of this package.
Url generator for communication with microservices
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
dev-main
2018-06-15 08:16 UTC
Requires
- php: ^7.1
Requires (Dev)
- phpunit/phpunit: ^7.2
This package is auto-updated.
Last update: 2024-05-14 01:31:11 UTC
README
Provides a single source of truth on how to generate URLs that point to GO1 microservices
Usage
<?php use go1\UtilUrl\ServiceUrlGenerator; //Instance $serviceUrlGenerator = new ServiceUrlGenerator(); $userServiceUrl = $serviceUrlGenerator->getInternalUrl('user'); $gatewayUrl = $serviceUrlGenerator->getPublicGatewayUrl(); //Static access $servicesUrls = ServiceUrlGenerator::getInternalUrls(['user', 'lo', 'explore']);