id = $id; $this->type = $type; $this->action = $action; $this->timestamp = $timestamp; $this->user = $user; $this->pageIdentifier = $pageIdentifier; $this->comment = $comment; $this->details = $details; } /** * @since 0.5 * @return string */ public function getUser() { return $this->user; } /** * @since 0.5 * @return string */ public function getAction() { return $this->action; } /** * @since 0.5 * @return string */ public function getComment() { return $this->comment; } /** * @since 0.5 * @return int */ public function getId() { return $this->id; } /** * @since 0.6 * @return PageIdentifier */ public function getPageIdentifier() { return $this->pageIdentifier; } /** * @since 0.5 * @return string */ public function getTimestamp() { return $this->timestamp; } /** * @since 0.5 * @return string */ public function getType() { return $this->type; } /** * @since 0.5 * @return array */ public function getDetails() { return $this->details; } /** * @link http://php.net/manual/en/jsonserializable.jsonserialize.php */ public function jsonSerialize() { return array( 'id' => $this->id, 'type' => $this->type, 'action' => $this->action, 'timestamp' => $this->timestamp, 'user' => $this->user, 'pageidentifier' => $this->pageIdentifier, 'comment' => $this->comment, 'details' => $this->details, ); } /** * @param array $json * * @return self */ public static function jsonDeserialize( $json ) { return new self( $json['id'], $json['type'], $json['action'], $json['timestamp'], $json['user'], PageIdentifier::jsonDeserialize( $json['pageidentifier'] ), $json['comment'], $json['details'] ); } }