-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSwaggerDocCreatedEvent.php
58 lines (50 loc) · 1.19 KB
/
SwaggerDocCreatedEvent.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
namespace Yoanm\SymfonyJsonRpcHttpServerSwaggerDoc\Event;
use Yoanm\JsonRpcServerDoc\Domain\Model\HttpServerDoc;
use Yoanm\SymfonyJsonRpcHttpServerDoc\Event\DocEvent;
/**
* Class SwaggerDocCreatedEvent
*/
class SwaggerDocCreatedEvent extends DocEvent
{
const EVENT_NAME = 'json_rpc_http_server_swagger_doc.array_created';
/** @var array */
private $swaggerDoc;
/** @var HttpServerDoc|null */
private $serverDoc;
/**
* @param array $swaggerDoc
* @param HttpServerDoc|null $serverDoc
*/
public function __construct(
array $swaggerDoc,
HttpServerDoc $serverDoc = null
) {
$this->swaggerDoc = $swaggerDoc;
$this->serverDoc = $serverDoc;
}
/**
* @return array
*/
public function getSwaggerDoc()
{
return $this->swaggerDoc;
}
/**
* @return HttpServerDoc|null
*/
public function getServerDoc()
{
return $this->serverDoc;
}
/**
* @param array $swaggerDoc
*
* @return SwaggerDocCreatedEvent
*/
public function setSwaggerDoc(array $swaggerDoc)
{
$this->swaggerDoc = $swaggerDoc;
return $this;
}
}