-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from mente/feature-sandbox
sandbox mode to allow working without actual rabbitmq instance
- Loading branch information
Showing
13 changed files
with
632 additions
and
6 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
parameters: | ||
m6_web_amqp.exchange.class: 'M6Web\Bundle\AmqpBundle\Sandbox\NullExchange' | ||
m6_web_amqp.queue.class: 'M6Web\Bundle\AmqpBundle\Sandbox\NullQueue' | ||
m6_web_amqp.connection.class: 'M6Web\Bundle\AmqpBundle\Sandbox\NullConnection' | ||
m6_web_amqp.channel.class: 'M6Web\Bundle\AmqpBundle\Sandbox\NullChannel' | ||
m6_web_amqp.envelope.class: '\M6Web\Bundle\AmqpBundle\Sandbox\NullEnvelope' | ||
|
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace M6Web\Bundle\AmqpBundle\Sandbox; | ||
|
||
use AMQPConnection; | ||
|
||
/** | ||
* Channel which does not do anything with connection | ||
*/ | ||
class NullChannel extends \AMQPChannel | ||
{ | ||
public function __construct(AMQPConnection $amqp_connection) | ||
{ | ||
//noop | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
namespace M6Web\Bundle\AmqpBundle\Sandbox; | ||
|
||
/** | ||
* Connection that does not connect to anything | ||
*/ | ||
class NullConnection extends \AMQPConnection | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function connect() | ||
{ | ||
return true; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function pconnect() | ||
{ | ||
return true; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function pdisconnect() | ||
{ | ||
return true; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function disconnect() | ||
{ | ||
return true; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function reconnect() | ||
{ | ||
return true; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function preconnect() | ||
{ | ||
return true; | ||
} | ||
} |
Oops, something went wrong.