Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added the support of metadata aware messages

  • Loading branch information...
commit 85db749cea27870067e34b9ea2df43869bc25600 1 parent 2f68b01
@stof authored
Showing with 15 additions and 2 deletions.
  1. +1 −1  composer.json
  2. +14 −1 src/Stampie/Extra/Message/Decorator.php
View
2  composer.json
@@ -18,7 +18,7 @@
"minimum-stability": "dev",
"require" : {
"php": ">=5.3.3",
- "henrikbjorn/stampie": "~0.6",
+ "henrikbjorn/stampie": "~0.7",
"symfony/event-dispatcher": "~2.0"
},
"require-dev": {
View
15 src/Stampie/Extra/Message/Decorator.php
@@ -3,6 +3,7 @@
namespace Stampie\Extra\Message;
use Stampie\MessageInterface;
+use Stampie\Message\MetadataAwareInterface;
use Stampie\Message\TaggableInterface;
/**
@@ -12,7 +13,7 @@
*
* @author Christophe Coevoet <stof@notk.org>
*/
-class Decorator implements MessageInterface, TaggableInterface
+class Decorator implements MessageInterface, TaggableInterface, MetadataAwareInterface
{
protected $delegate;
@@ -104,4 +105,16 @@ public function getTag()
return array();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMetadata()
+ {
+ if ($this->delegate instanceof MetadataAwareInterface) {
+ return $this->delegate->getMetadata();
+ }
+
+ return array();
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.