Page MenuHomeDevCentral

D227.diff
No OneTemporary

D227.diff

diff --git a/src/AMQPBroker.php b/src/AMQPBroker.php
--- a/src/AMQPBroker.php
+++ b/src/AMQPBroker.php
@@ -5,7 +5,7 @@
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Message\AMQPMessage;
-class AMQPBroker extends Broker {
+class AMQPBroker extends Broker implements BuildableFromConfigInterface {
///
/// Private members
diff --git a/src/BlackholeBroker.php b/src/BlackholeBroker.php
--- a/src/BlackholeBroker.php
+++ b/src/BlackholeBroker.php
@@ -2,7 +2,7 @@
namespace Keruald\Broker;
-class BlackholeBroker extends Broker {
+class BlackholeBroker extends Broker implements BuildableFromConfigInterface {
///
/// Broker implementation
///
diff --git a/src/Broker.php b/src/Broker.php
--- a/src/Broker.php
+++ b/src/Broker.php
@@ -4,6 +4,4 @@
abstract class Broker {
abstract public function sendMessage ($message);
-
- abstract static public function makeFromConfig ($params);
}
diff --git a/src/BuildableFromConfigInterface.php b/src/BuildableFromConfigInterface.php
new file mode 100644
--- /dev/null
+++ b/src/BuildableFromConfigInterface.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace Keruald\Broker;
+
+interface BuildableFromConfigInterface {
+ static public function makeFromConfig ($params);
+}

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 22:59 (17 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2308551
Default Alt Text
D227.diff (1 KB)

Event Timeline