Frlnc / php-slack

A lightweight PHP implementation of Slack's API.
130 stars 40 forks source link

Protected arrays #19

Closed ace411 closed 8 years ago

ace411 commented 8 years ago

I cannot loop through the history of the messages posted to the channel though I can view all the key-value pairs in the array.

This is my response: object(Frlnc\Slack\Http\SlackResponse)#6 (3) { ["body":protected]=> array(3) { ["ok"]=> bool(true) ["messages"]=> array(73) { [0]=> array(4) { ......

This is the error I get when trying to access the array:

Fatal error: Uncaught Error: Cannot access protected property Frlnc\Slack\Http\SlackResponse::$body in C:\xampp\htdocs\fair\slack.php:37 Stack trace:

0 {main}

thrown in C:\xampp\htdocs\fair\slack.php on line 37