-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: Config fix and ResponseMatchEvent
- Loading branch information
1 parent
5dde418
commit e96cb17
Showing
7 changed files
with
107 additions
and
14 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,74 @@ | ||
<?php | ||
|
||
namespace Bpa\ApiSandboxBundle\Event; | ||
|
||
use Bpa\ApiSandboxBundle\Annotation\SandboxRequest; | ||
use Bpa\ApiSandboxBundle\Annotation\SandboxResponse; | ||
use Symfony\Component\EventDispatcher\Event; | ||
|
||
/** | ||
* Event which holds a matched response | ||
*/ | ||
class ResponseMatchEvent extends Event | ||
{ | ||
/** | ||
* @var SandboxRequest | ||
*/ | ||
private $request; | ||
|
||
/** | ||
* @var SandboxResponse | ||
*/ | ||
private $response; | ||
|
||
/** | ||
* ResponseEvent constructor. | ||
* | ||
* @param SandboxRequest $request | ||
* @param SandboxResponse $response | ||
*/ | ||
public function __construct(SandboxRequest $request, SandboxResponse $response) | ||
{ | ||
$this->response = $response; | ||
} | ||
|
||
/** | ||
* @return SandboxRequest | ||
*/ | ||
public function getRequest() | ||
{ | ||
return $this->request; | ||
} | ||
|
||
/** | ||
* @param SandboxRequest $request | ||
* | ||
* @return $this | ||
*/ | ||
public function setRequest(SandboxRequest $request) | ||
{ | ||
$this->request = $request; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return SandboxResponse | ||
*/ | ||
public function getResponse() | ||
{ | ||
return $this->response; | ||
} | ||
|
||
/** | ||
* @param SandboxResponse $response | ||
* | ||
* @return $this | ||
*/ | ||
public function setResponse(SandboxResponse $response) | ||
{ | ||
$this->response = $response; | ||
|
||
return $this; | ||
} | ||
} |
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