HasMonitoringEventsTrait.php 869 B

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