This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
/
ProfilerEvent.php
98 lines (88 loc) · 2.07 KB
/
ProfilerEvent.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
/**
* @see https://github.com/zendframework/zend-developer-tools for the canonical source repository
* @copyright Copyright (c) 2011-2018 Zend Technologies USA Inc. (https://www.zend.com)
* @license https://github.com/zendframework/zend-developer-tools/blob/master/LICENSE.md New BSD License
*/
namespace ZendDeveloperTools;
use Zend\EventManager\Event;
use Zend\Mvc\ApplicationInterface;
class ProfilerEvent extends Event
{
/**
* The EVENT_PROFILER_INIT occurs on bootstrap if the profiler is enabled.
*
* This event allows you to grab the report.
*
* @var string
*/
const EVENT_PROFILER_INIT = 'profiler_init';
/**
* The EVENT_COLLECTED occurs after all data was collected.
*
* This event allows you to grab the report.
*
* @var string
*/
const EVENT_COLLECTED = 'collected';
/**
* Set Application
*
* @return ApplicationInterface|null
*/
public function getApplication()
{
return $this->getParam('application');
}
/**
* Set Application
*
* @param ApplicationInterface $application
* @return self
*/
public function setApplication(ApplicationInterface $application)
{
$this->setParam('application', $application);
return $this;
}
/**
* Get profiler
*
* @return string
*/
public function getProfiler()
{
return $this->getParam('profiler');
}
/**
* Set profiler
*
* @param Profiler $profiler
* @return self
*/
public function setProfiler(Profiler $profiler)
{
$this->setParam('profiler', $profiler);
return $this;
}
/**
* Get report
*
* @return ReportInterface
*/
public function getReport()
{
return $this->getParam('report');
}
/**
* Set report
*
* @param ReportInterface $report
* @return self
*/
public function setReport(ReportInterface $report)
{
$this->setParam('report', $report);
return $this;
}
}