timestamp = (int) $item['timestamp']; $this->event = (int) $item['event']; $this->description = $item['description']; $this->wpmlJobId = (int) $item['wpmlJobId']; $this->ateJobId = (int) $item['ateJobId']; $this->extraData = (array) $item['extraData']; } } /** * @return string */ public function getFormattedDate() { return date_i18n( 'Y/m/d g:i:s A', $this->timestamp ); } /** * @return string */ public function getEventLabel() { return wpml_collect( [ ErrorEvents::SERVER_ATE => 'ATE Server Communication', ErrorEvents::SERVER_AMS => 'AMS Server Communication', ErrorEvents::SERVER_XLIFF => 'XLIFF Server Communication', ErrorEvents::JOB_DOWNLOAD => 'Job Download', ] )->get( $this->event, '' ); } /** * @return string */ public function getExtraDataToString() { return json_encode( $this->extraData ); } }