Reputation: 31
I'm using beanstalks 1.13+1+g91c54fc and I have a problem getting private storage array from this output:
Pheanstalk\Response\ArrayResponse Object
(
[name:Pheanstalk\Response\ArrayResponse:private] => OK
[storage:ArrayObject:private] => Array
(
[name] => 'transaction_processing'
[current-jobs-urgent] => 0
[current-jobs-ready] => 1
[current-jobs-reserved] => 0
[current-jobs-delayed] => 0
[current-jobs-buried] => 0
[total-jobs] => 1
[current-using] => 0
[current-watching] => 0
[current-waiting] => 0
[cmd-delete] => 0
[cmd-pause-tube] => 0
[pause] => 0
[pause-time-left] => 0
)
)
I want to get data from [storage:ArrayObject:private] => Array
Upvotes: 0
Views: 37
Reputation: 35169
According to the code at https://github.com/pheanstalk/pheanstalk/blob/1459f2f62dddfe28902e0584708417dddd79bd70/src/Response/ArrayResponse.php#L34 - that object is usable as an array,
So something like var_dump($response['total-jobs']);
would output (given that sample data) - '1'.
That code is no longer used in the latest (now v5) version of the library, but you can see the older code at https://github.com/pheanstalk/pheanstalk/tree/v4 - of the code you downloaded.
Upvotes: 0