Skip to content

Commit 8724832

Browse files
committed
Merge pull request php-amqplib#172 from fprochazka/patch-5
Declare missing properties
2 parents 94f832b + c067cba commit 8724832

10 files changed

+225
-32
lines changed

PhpAmqpLib/Channel/AMQPChannel.php

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,32 @@ class AMQPChannel extends AbstractChannel
1818
*/
1919
public $callbacks = array();
2020

21+
/**
22+
* Whether or not the channel has been "opened" or not
23+
*
24+
* @var bool
25+
*/
26+
protected $is_open = false;
27+
2128
/**
2229
* @var int
2330
*/
24-
private $next_delivery_tag = 0;
31+
protected $default_ticket;
2532

2633
/**
27-
* @var Callable
34+
* @var bool
2835
*/
29-
private $ack_handler = null;
36+
protected $active;
3037

3138
/**
32-
* @var Callable
39+
* @var array
3340
*/
34-
private $nack_handler = null;
41+
protected $alerts;
3542

3643
/**
37-
* If the channel is in confirm_publish mode this array will store all published messages
38-
* until they get ack'ed or nack'ed
39-
* @var AMQPMessage[]
44+
* @var bool
4045
*/
41-
private $published_messages = array();
46+
protected $auto_decode;
4247

4348
/**
4449
* These parameters will be passed to function in case of basic_return:
@@ -60,6 +65,29 @@ class AMQPChannel extends AbstractChannel
6065
*/
6166
protected $batch_messages = array();
6267

68+
/**
69+
* If the channel is in confirm_publish mode this array will store all published messages
70+
* until they get ack'ed or nack'ed
71+
*
72+
* @var AMQPMessage[]
73+
*/
74+
private $published_messages = array();
75+
76+
/**
77+
* @var int
78+
*/
79+
private $next_delivery_tag = 0;
80+
81+
/**
82+
* @var callable
83+
*/
84+
private $ack_handler = null;
85+
86+
/**
87+
* @var callable
88+
*/
89+
private $nack_handler = null;
90+
6391
/**
6492
* Circular buffer to speed up both basic_publish() and publish_batch().
6593
* Max size limited by $publish_cache_max_size.
@@ -75,12 +103,6 @@ class AMQPChannel extends AbstractChannel
75103
*/
76104
private $publish_cache_max_size;
77105

78-
/**
79-
* Whether or not the channel has been "opened" or not
80-
* @var bool
81-
*/
82-
protected $is_open = false;
83-
84106

85107
public function __construct($connection, $channel_id = null, $auto_decode = true)
86108
{

PhpAmqpLib/Channel/AbstractChannel.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,29 @@ class AbstractChannel
2020

2121
public static $PROTOCOL_CONSTANTS_CLASS;
2222

23+
/**
24+
* @var array
25+
*/
26+
protected $frame_queue;
27+
28+
/**
29+
* @var array
30+
*/
31+
protected $method_queue;
32+
33+
/**
34+
* @var bool
35+
*/
36+
protected $auto_decode;
37+
38+
/**
39+
* @var string
40+
*/
41+
protected $amqp_protocol_header;
42+
43+
/**
44+
* @var bool
45+
*/
2346
protected $debug;
2447

2548
/**

PhpAmqpLib/Connection/AbstractConnection.php

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,43 +31,80 @@ class AbstractConnection extends AbstractChannel
3131
)
3232
);
3333

34-
public $version_major;
34+
/**
35+
* @var AMQPChannel[]
36+
*/
37+
public $channels = array();
3538

36-
public $version_minor;
39+
/**
40+
* @var int
41+
*/
42+
protected $version_major;
43+
44+
/**
45+
* @var int
46+
*/
47+
protected $version_minor;
3748

38-
public $server_properties;
49+
/**
50+
* @var array
51+
*/
52+
protected $server_properties;
3953

40-
public $heartbeat;
54+
/**
55+
* @var string
56+
*/
57+
protected $heartbeat;
4158

4259
/**
4360
* @var array
4461
*/
45-
public $mechanisms;
62+
protected $mechanisms;
4663

4764
/**
4865
* @var array
4966
*/
50-
public $locales;
67+
protected $locales;
5168

5269
/**
5370
* @var bool
5471
*/
55-
public $wait_tune_ok;
72+
protected $wait_tune_ok;
5673

5774
/**
5875
* @var string
5976
*/
60-
public $known_hosts;
77+
protected $known_hosts;
6178

6279
/**
6380
* @var AMQPReader
6481
*/
65-
public $input;
82+
protected $input;
6683

6784
/**
68-
* @var AMQPChannel[]
85+
* @var string
6986
*/
70-
public $channels = array();
87+
protected $vhost;
88+
89+
/**
90+
* @var bool
91+
*/
92+
protected $insist;
93+
94+
/**
95+
* @var string
96+
*/
97+
protected $login_method;
98+
99+
/**
100+
* @var AMQPWriter
101+
*/
102+
protected $login_response;
103+
104+
/**
105+
* @var string
106+
*/
107+
protected $locale;
71108

72109
/**
73110
* @var SocketIO
@@ -115,14 +152,14 @@ class AbstractConnection extends AbstractChannel
115152
/**
116153
* Handles connection blocking from the server
117154
*
118-
* @var Callable
155+
* @var callable
119156
*/
120157
private $connection_block_handler = null;
121158

122159
/**
123160
* Handles connection unblocking from the server
124161
*
125-
* @var Callable
162+
* @var callable
126163
*/
127164
private $connection_unblock_handler = null;
128165

PhpAmqpLib/Message/AMQPMessage.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,19 @@
1010
class AMQPMessage extends GenericContent
1111
{
1212

13+
/**
14+
* @var string
15+
*/
1316
public $body;
1417

18+
/**
19+
* @var string
20+
*/
21+
public $content_encoding;
22+
23+
/**
24+
* @var array
25+
*/
1526
protected static $PROPERTIES = array(
1627
"content_type" => "shortstr",
1728
"content_encoding" => "shortstr",

PhpAmqpLib/Wire/AMQPDecimal.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@
1818
class AMQPDecimal
1919
{
2020

21+
/**
22+
* @var int
23+
*/
24+
protected $n;
25+
26+
/**
27+
* @var int
28+
*/
29+
protected $e;
30+
31+
32+
2133
public function __construct($n, $e)
2234
{
2335
if ($e < 0) {

PhpAmqpLib/Wire/AMQPReader.php

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,45 @@ class AMQPReader
2727
const LONGLONG = 8;
2828
const TIMESTAMP = 8;
2929

30+
/**
31+
* @var string
32+
*/
3033
protected $str;
3134

35+
/**
36+
* @var int
37+
*/
3238
protected $str_length;
3339

40+
/**
41+
* @var int
42+
*/
3443
protected $offset;
3544

45+
/**
46+
* @var int
47+
*/
3648
protected $bitcount;
3749

50+
/**
51+
* @var bool
52+
*/
3853
protected $is64bits;
3954

55+
/**
56+
* @var int
57+
*/
4058
protected $timeout;
4159

60+
/**
61+
* @var int
62+
*/
4263
protected $bits;
4364

44-
protected $io = null;
65+
/**
66+
* @var IO\AbstractIO
67+
*/
68+
protected $io;
4569

4670

4771

PhpAmqpLib/Wire/AMQPWriter.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,23 @@
88
class AMQPWriter
99
{
1010

11+
/**
12+
* @var string
13+
*/
14+
protected $out;
15+
16+
/**
17+
* @var array
18+
*/
19+
protected $bits;
20+
21+
/**
22+
* @var int
23+
*/
24+
protected $bitcount;
25+
26+
27+
1128
public function __construct()
1229
{
1330
$this->out = "";

PhpAmqpLib/Wire/GenericContent.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ abstract class GenericContent
1616
*/
1717
public $delivery_info = array();
1818

19+
/**
20+
* @var array
21+
*/
22+
protected $prop_types;
23+
1924
/**
2025
* @var array
2126
*/

PhpAmqpLib/Wire/IO/SocketIO.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,25 @@
88
class SocketIO extends AbstractIO
99
{
1010

11+
/**
12+
* @var string
13+
*/
14+
protected $host;
15+
16+
/**
17+
* @var int
18+
*/
19+
protected $port;
20+
21+
/**
22+
* @var int
23+
*/
24+
protected $timeout;
25+
1126
/**
1227
* @var resource
1328
*/
14-
private $sock = null;
29+
private $sock;
1530

1631

1732

0 commit comments

Comments
 (0)