68 parent::__construct(
$title, $slots, $dbDomain );
69 Assert::parameterType( \stdClass::class, $row,
'$row' );
71 $timestamp = MWTimestamp::convert( TS_MW, $row->ar_timestamp );
72 Assert::parameter( is_string( $timestamp ),
'$row->rev_timestamp',
'must be a valid timestamp' );
74 $this->mArchiveId = intval( $row->ar_id );
79 $this->mPageId = isset( $row->ar_page_id ) ? intval( $row->ar_page_id ) :
$title->getArticleID();
84 $this->mParentId = isset( $row->ar_parent_id ) ? intval( $row->ar_parent_id ) :
null;
85 $this->mId = isset( $row->ar_rev_id ) ? intval( $row->ar_rev_id ) :
null;
86 $this->mComment = $comment;
88 $this->mTimestamp = $timestamp;
89 $this->mMinorEdit = boolval( $row->ar_minor_edit );
90 $this->mDeleted = intval( $row->ar_deleted );
91 $this->mSize = isset( $row->ar_len ) ? intval( $row->ar_len ) :
null;
92 $this->mSha1 = !empty( $row->ar_sha1 ) ? $row->ar_sha1 :
null;