Saving Mikrotik Simple Queue Statistic PHP API

I want to save the statistics of the Mikrotik /simple queue using the PHP API. I have been able to pull the data but seems my implementation on the PHP side is a problem. The following is the code and the resulting array object.
foreach ($util->setMenu(‘/queue simple’)->getAll() as $queueEntry) {
// $lasArray = $queueEntry;
print_r($queueEntry);
}Excerpt for Result since its returning for all users in the office, I have choosen just to display for one user. Take it that PEAR2\Net\RouterOS\Response Object is retuned for all users, i.e all in this case over 50 users. I would like to save this data to database but only the relevant ones like

[.id], [name], [target], [limit-at], [max-limit] and [bytes],

any assistance here would be highly regarded.
PEAR2\Net\RouterOS\Response Object
(
[unrecognizedWords:protected] => Array
(
)

[_type:PEAR2\Net\RouterOS\Response:private] => !re
[attributes:protected] => Array
(
[.id] => *12
[name] => GikundaPhone
[target] => 192.168.1.108/32
[parent] => none
[packet-marks] =>
[priority] => 8/8
[queue] => default-small/default-small
[limit-at] => 128000/384000
[max-limit] => 384000/384000
[burst-limit] => 0/0
[burst-threshold] => 0/0
[burst-time] => 0s/0s
[bucket-size] => 0.1/0.1
[bytes] => 16515474/129310087
[total-bytes] => 0
[packets] => 127812/133712
[total-packets] => 0
[dropped] => 76/8667
[total-dropped] => 0
[rate] => 0/0
[total-rate] => 0
[packet-rate] => 0/0
[total-packet-rate] => 0
[queued-packets] => 0/0
[total-queued-packets] => 0
[queued-bytes] => 0/0
[total-queued-bytes] => 0
[invalid] => false
[dynamic] => false
[disabled] => false
)

[_tag:PEAR2\Net\RouterOS\Message:private] =>
)

If the properties you want to save are already there, you can extract them with the getProperty() method, or __invoke(), i.e.

echo $queueEntry('name');
//same as
echo $queueEntry->getProperty('name'); 

Also, you can let the router give you only those properties, to minimize the input and be able to just loop through the properties, e.g.

foreach ($util->setMenu('/queue simple')->getAll(array('.proplist' => '.id,name,target,limit-at,max-limit,bytes')) as $queueEntry) {
print_r($queueEntry);
foreach ($queueEntry as $propName => $propValue) {
//form DB query here
}
} 

I am working on quite the same. Maybe this will help you. Let me know what you think.

https://github.com/manuzoli/mikrostats