Skip to content

Commit 55180b1

Browse files
committed
Add setInResearch, setDeprecated to Packet class
1 parent dae890f commit 55180b1

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/libraries/Packet.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,14 @@ public function refresh() {
706706
return false;
707707
}
708708

709+
public function setDeprecated( $value ) {
710+
if ( $value ) {
711+
$this->options_bitmask |= self::OPTION_DEPRECATED;
712+
} else {
713+
$this->options_bitmask &= ~self::OPTION_DEPRECATED;
714+
}
715+
}
716+
709717
public function setEditedCount( $value ) {
710718
$this->edited_count = $value;
711719
}
@@ -714,6 +722,14 @@ public function setEditedDateTime( DateTime $value ) {
714722
$this->edited_datetime = $value->format( 'Y-m-d H:i:s' );
715723
}
716724

725+
public function setInResearch( $value ) {
726+
if ( $value ) {
727+
$this->options_bitmask |= self::OPTION_RESEARCH;
728+
} else {
729+
$this->options_bitmask &= ~self::OPTION_RESEARCH;
730+
}
731+
}
732+
717733
public function setMarkdown( $value ) {
718734
if ( $value ) {
719735
$this->options_bitmask |= self::OPTION_MARKDOWN;
@@ -745,7 +761,7 @@ public function setPublished( $value ) {
745761
$this->options_bitmask &= ~self::OPTION_PUBLISHED;
746762
}
747763
}
748-
764+
749765
public function setUsedBy( $value ) {
750766
if (!isset(Common::$database)) {
751767
Common::$database = DatabaseDriver::getDatabaseObject();

0 commit comments

Comments
 (0)