Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rekalogika/temporary-url-bundle
Symfony bundle for creating temporary URLs to your resources. You provide the resource in a plain PHP object, and a service to turn it into a HTTP response. The framework handles the rest.
https://github.com/rekalogika/temporary-url-bundle
http php response symfony symfony-bundle temporary-url temporary-urls
Last synced: about 1 month ago
JSON representation
Symfony bundle for creating temporary URLs to your resources. You provide the resource in a plain PHP object, and a service to turn it into a HTTP response. The framework handles the rest.
- Host: GitHub
- URL: https://github.com/rekalogika/temporary-url-bundle
- Owner: rekalogika
- License: mit
- Created: 2023-09-06T14:03:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-17T01:06:22.000Z (2 months ago)
- Last Synced: 2024-09-30T16:21:19.707Z (about 2 months ago)
- Topics: http, php, response, symfony, symfony-bundle, temporary-url, temporary-urls
- Language: PHP
- Homepage: https://rekalogika.dev/temporary-url-bundle
- Size: 337 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# rekalogika/temporary-url-bundle
Symfony bundle for creating temporary URLs to your resources. You provide the
resource in a plain PHP object, and a service to turn it into a HTTP response.
The framework handles the rest.## Synopsis
```php
use Rekalogika\TemporaryUrl\Attribute\AsTemporaryUrlServer;
use Rekalogika\TemporaryUrl\TemporaryUrlGeneratorInterface;
use Symfony\Component\HttpFoundation\Response;class MyData
{
public string $name = 'John Doe';
}class MyDataServer
{
#[AsTemporaryUrlServer]
public function respond(MyData $data): Response
{
return new Response('My name is ' . $data->name);
}
}/** @var TemporaryUrlGeneratorInterface $temporaryUrlGenerator */
$myData = new MyData;
$myData->name = 'Jane Doe';
$url = $temporaryUrlGenerator->generateUrl($myData);
```## Documentation
[rekalogika.dev/temporary-url-bundle](https://rekalogika.dev/temporary-url-bundle)
## License
MIT
## Contributing
Issues and pull requests should be filed in the GitHub repository
[rekalogika/temporary-url-bundle](https://github.com/rekalogika/temporary-url-bundle).