| 1 | <?php |
| 2 | namespace Aws; |
| 3 | |
| 4 | |
| 5 | trait HasMonitoringEventsTrait |
| 6 | { |
| 7 | private $monitoringEvents = []; |
| 8 | |
| 9 | /** |
| 10 | * Get client-side monitoring events attached to this object. Each event is |
| 11 | * represented as an associative array within the returned array. |
| 12 | * |
| 13 | * @return array |
| 14 | */ |
| 15 | public function getMonitoringEvents() |
| 16 | { |
| 17 | return $this->monitoringEvents; |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * Prepend a client-side monitoring event to this object's event list |
| 22 | * |
| 23 | * @param array $event |
| 24 | */ |
| 25 | public function prependMonitoringEvent(array $event) |
| 26 | { |
| 27 | array_unshift($this->monitoringEvents, $event); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Append a client-side monitoring event to this object's event list |
| 32 | * |
| 33 | * @param array $event |
| 34 | */ |
| 35 | public function appendMonitoringEvent(array $event) |
| 36 | { |
| 37 | $this->monitoringEvents []= $event; |
| 38 | } |
| 39 | } |