-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TE-8674 Added new endpoints to the application (#8311)
TE-8674 Separate different endpoint bootstraps
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
...ation/Plugin/EventDispatcher/GatewayMonitoringRequestTransactionEventDispatcherPlugin.php
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,41 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace Spryker\Zed\Monitoring\Communication\Plugin\EventDispatcher; | ||
|
||
use Spryker\Service\Container\ContainerInterface; | ||
use Spryker\Shared\EventDispatcher\EventDispatcherInterface; | ||
use Spryker\Shared\EventDispatcherExtension\Dependency\Plugin\EventDispatcherPluginInterface; | ||
use Spryker\Zed\Kernel\Communication\AbstractPlugin; | ||
|
||
/** | ||
* @method \Spryker\Zed\Monitoring\Business\MonitoringFacade getFacade() | ||
* @method \Spryker\Zed\Monitoring\Communication\MonitoringCommunicationFactory getFactory() | ||
* @method \Spryker\Zed\Monitoring\MonitoringConfig getConfig() | ||
*/ | ||
class GatewayMonitoringRequestTransactionEventDispatcherPlugin extends AbstractPlugin implements EventDispatcherPluginInterface | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* - Adds subscriber to listen for controller events. | ||
* | ||
* @api | ||
* | ||
* @param \Spryker\Shared\EventDispatcher\EventDispatcherInterface $eventDispatcher | ||
* @param \Spryker\Service\Container\ContainerInterface $container | ||
* | ||
* @return \Spryker\Shared\EventDispatcher\EventDispatcherInterface | ||
*/ | ||
public function extend(EventDispatcherInterface $eventDispatcher, ContainerInterface $container): EventDispatcherInterface | ||
{ | ||
$eventDispatcher->addSubscriber( | ||
$this->getFactory()->createGatewayControllerListener() | ||
); | ||
|
||
return $eventDispatcher; | ||
} | ||
} |