Skip to content

Commit 4b7540b

Browse files
authored
Merge pull request #1 from inextensodigital/master_sf4
Create a custom hydrated ContainerAwareEventDispatcherBus
2 parents 8d8dbfb + 8039bb3 commit 4b7540b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
namespace Rezzza\CommandBus\Domain;
4+
5+
use Rezzza\CommandBus\Domain\EventDispatcherBus;
6+
use Symfony\Component\DependencyInjection\ContainerInterface;
7+
8+
class ContainerAwareEventDispatcherBus extends EventDispatcherBus
9+
{
10+
/**
11+
* @var ContainerInterface
12+
*/
13+
private $container;
14+
15+
/**
16+
* @param ContainerInterface $container
17+
*/
18+
public function setContainer(ContainerInterface $container)
19+
{
20+
$this->container = $container;
21+
}
22+
23+
/**
24+
* @return ContainerInterface
25+
*/
26+
public function getContainer()
27+
{
28+
return $this->container;
29+
}
30+
}

0 commit comments

Comments
 (0)