File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,10 @@ class Packet implements JsonSerializable {
2929 const DIRECTION_SERVER_CLIENT = 2 ;
3030 const DIRECTION_PEER_TO_PEER = 3 ;
3131
32- const OPTION_MARKDOWN = 0x00000001 ;
33- const OPTION_PUBLISHED = 0x00000002 ;
32+ const OPTION_MARKDOWN = 0x00000001 ;
33+ const OPTION_PUBLISHED = 0x00000002 ;
34+ const OPTION_DEPRECATED = 0x00000004 ;
35+ const OPTION_RESEARCH = 0x00000008 ;
3436
3537 protected $ created_datetime ;
3638 protected $ edited_count ;
@@ -559,6 +561,18 @@ public function getUserId() {
559561 return $ this ->user_id ;
560562 }
561563
564+ public function isDeprecated () {
565+ return ($ this ->options_bitmask & self ::OPTION_DEPRECATED );
566+ }
567+
568+ public function isInResearch () {
569+ return ($ this ->options_bitmask & self ::OPTION_RESEARCH );
570+ }
571+
572+ public function isPublished () {
573+ return ($ this ->options_bitmask & self ::OPTION_PUBLISHED );
574+ }
575+
562576 public function jsonSerialize () {
563577 return [
564578 'created_datetime ' => $ this ->getCreatedDateTime (),
You can’t perform that action at this time.
0 commit comments