id = $row['id']; $this->user_id = $row['user_id']; $this->app = $row['app']; $this->action = $row['action']; $this->object_type = $row['object_type']; $this->object_id = $row['object_id']; $this->summary = $row['summary']; $this->before = $row['before']; $this->after = $row['after']; $this->after_hash = $row['after_hash']; $this->status = $row['status']; $this->undo_of = $row['undo_of']; $this->created_at = $row['created_at']; } /** * Canonical hash of a state value. * * @param mixed $state State. */ public static function hash( mixed $state ): string { return hash( 'sha256', (string) wp_json_encode( $state ) ); } }