1 | <?php |
||
18 | class MessageJournal extends DataCollector implements Journal |
||
19 | { |
||
20 | /** |
||
21 | * @var Formatter |
||
22 | */ |
||
23 | private $formatter; |
||
24 | |||
25 | /** |
||
26 | * @param Formatter $formatter |
||
27 | */ |
||
28 | public function __construct(Formatter $formatter = null) |
||
33 | |||
34 | /** |
||
35 | * {@inheritdoc} |
||
36 | */ |
||
37 | public function addSuccess(RequestInterface $request, ResponseInterface $response) |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function addFailure(RequestInterface $request, Exception $exception) |
||
63 | |||
64 | /** |
||
65 | * Get the successful request-resonse pairs. |
||
66 | * |
||
67 | * @return array |
||
68 | */ |
||
69 | public function getSucessfulRequests() |
||
73 | |||
74 | /** |
||
75 | * Get the failed request-resonse pairs. |
||
76 | * |
||
77 | * @return array |
||
78 | */ |
||
79 | public function getFailedRequests() |
||
83 | |||
84 | /** |
||
85 | * Get the total number of request made. |
||
86 | * |
||
87 | * @return int |
||
88 | */ |
||
89 | public function getTotalRequests() |
||
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | public function collect(Request $request, Response $response, \Exception $exception = null) |
||
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | public function getName() |
||
109 | } |
||
110 |