0

I am using a 3rd party script which returns data in a protected class.

InstagramAPI\FollowerResponse Object ( [followers:protected] => Array ( [0] => InstagramAPI\User Object ( [username:protected] => touchmyjace [has_anonymous_profile_picture:protected] => [is_favorite:protected] => [profile_pic_url:protected] => http://scontent.cdninstagram.com/t51.2885-19/s150x150/14583326_277270599333297_6673967741591879680_a.jpg [full_name:protected] => harlee [pk:protected] => 1474468910 [is_verified:protected] => [is_private:protected] => [coeff_weight:protected] => 0

I dont want to change the class because it is 3rd party and didnt work well when I tried. I need a way to access/convert these so I can access them.

Thanks

Machavity
  • 28,730
  • 25
  • 78
  • 91
Dermot
  • 17
  • 6
  • Use the public methods available to access the properties. If you use an IDE (netbeans, phpstorm, etc) the editor will auto complete what's available so you don't have to dig around the source files yourself. – JimL Oct 20 '16 at 19:15
  • Check out the second answer in the duplicate involving the `ReflectionClass`. That should do what you want – Machavity Oct 20 '16 at 19:16

0 Answers0