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