/** * Collect data from an Event * * @param Event $event */ protected function collect(Event $event) { // if event doesn't have data if ($event->isEmpty()) { throw new InvalidParamException(Yii::t("app", "The event has no data. There is nothing to collect.")); } // Map tracker params to model properties $mapper = new Mapper(); $mapper->map($event); // Mapped data $data = $mapper->getData(); // Add collector data $data["collector_tstamp"] = time(); // Unix Timestamp for the event recorded by the collector $data["v_collector"] = "1.0"; // Collector version $this->data = $data; }