someniatko / amqp-url-parser
Parser of the AMQP (i.e. RabbitMQ) URLs
Installs: 1 051
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^8
- league/uri: ^6
Requires (Dev)
- phpunit/phpunit: ^9.0
- squizlabs/php_codesniffer: ^3.5
- vimeo/psalm: ^5.6
This package is auto-updated.
Last update: 2024-11-08 17:42:27 UTC
README
AMQP 0-9-1 URL parser.
Tested against all examples from the RabbitMQ URI specification (Appendix A)
Based on league/uri.
Usage
composer install someniatko/amqp-url-parser
<?php declare(strict_types=1); namespace YourCode; use Someniatko\AmqpUrlParser\Parser; $url = Parser::parse('amqp://username:password@host:1234/vhost'); $host = $url->host; $port = $url->port; $username = $url->username; $password = $url->password; $vhost = $url->vhost;