forked from php-enqueue/enqueue-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[doc] add dsn_to_context usage example
- Loading branch information
Showing
12 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,6 @@ $connectionFactory = new AmqpConnectionFactory(); | |
|
||
// same as above | ||
$factory = new AmqpConnectionFactory('amqp:'); | ||
$factory = new AmqpConnectionFactory('amqp+ext:'); | ||
|
||
// same as above | ||
$factory = new AmqpConnectionFactory([]); | ||
|
@@ -52,6 +51,10 @@ $factory = new AmqpConnectionFactory([ | |
$factory = new AmqpConnectionFactory('amqp://user:[email protected]:10000/%2f'); | ||
|
||
$psrContext = $factory->createContext(); | ||
|
||
// if you have enqueue/enqueue library installed you can use a function from there to create the context | ||
$psrContext = \Enqueue\dsn_to_context('amqp:'); | ||
$psrContext = \Enqueue\dsn_to_context('amqp+ext:'); | ||
``` | ||
|
||
## Declare topic. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,6 @@ $factory = new AmqpConnectionFactory(); | |
|
||
// same as above | ||
$factory = new AmqpConnectionFactory('amqp:'); | ||
$factory = new AmqpConnectionFactory('amqp+bunny:'); | ||
|
||
// same as above | ||
$factory = new AmqpConnectionFactory([]); | ||
|
@@ -52,6 +51,10 @@ $factory = new AmqpConnectionFactory([ | |
$factory = new AmqpConnectionFactory('amqp://user:[email protected]:10000/%2f'); | ||
|
||
$psrContext = $factory->createContext(); | ||
|
||
// if you have enqueue/enqueue library installed you can use a function from there to create the context | ||
$psrContext = \Enqueue\dsn_to_context('amqp:'); | ||
$psrContext = \Enqueue\dsn_to_context('amqp+bunny:'); | ||
``` | ||
|
||
## Declare topic. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,6 @@ $factory = new AmqpConnectionFactory(); | |
|
||
// same as above | ||
$factory = new AmqpConnectionFactory('amqp:'); | ||
$factory = new AmqpConnectionFactory('amqp+lib:'); | ||
|
||
// same as above | ||
$factory = new AmqpConnectionFactory([]); | ||
|
@@ -52,6 +51,10 @@ $factory = new AmqpConnectionFactory([ | |
$factory = new AmqpConnectionFactory('amqp://user:[email protected]:10000/%2f'); | ||
|
||
$psrContext = $factory->createContext(); | ||
|
||
// if you have enqueue/enqueue library installed you can use a function from there to create the context | ||
$psrContext = \Enqueue\dsn_to_context('amqp:'); | ||
$psrContext = \Enqueue\dsn_to_context('amqp+lib:'); | ||
``` | ||
|
||
## Declare topic. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters