Skip to content

Commit 3e0dd27

Browse files
committed
Deprecate legacy binary parser data attributes in message models
1 parent bd7f3b5 commit 3e0dd27

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

src/Model/HeaderBag.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
class HeaderBag
66
{
7-
public $data = '';
8-
97
public $attributes = array(
108
'qdCount' => 0,
119
'anCount' => 0,
@@ -21,6 +19,11 @@ class HeaderBag
2119
'rcode' => Message::RCODE_OK,
2220
);
2321

22+
/**
23+
* @deprecated unused, exists for BC only
24+
*/
25+
public $data = '';
26+
2427
public function get($name)
2528
{
2629
return isset($this->attributes[$name]) ? $this->attributes[$name] : null;

src/Model/Message.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,20 @@ private static function generateId()
7878
return mt_rand(0, 0xffff);
7979
}
8080

81-
public $data = '';
82-
8381
public $header;
8482
public $questions = array();
8583
public $answers = array();
8684
public $authority = array();
8785
public $additional = array();
8886

87+
/**
88+
* @deprecated still used internally for BC reasons, should not be used externally.
89+
*/
90+
public $data = '';
91+
92+
/**
93+
* @deprecated still used internally for BC reasons, should not be used externally.
94+
*/
8995
public $consumed = 0;
9096

9197
public function __construct()

0 commit comments

Comments
 (0)