php - accessing protected object in array -


what correct syntax access body, these objects not arrays , parent objects node:protected

 courseobjectcontent object     (         [node:protected] => stdclass object             (                 [nid] => 9397                 [type] => book                 [language] =>                  [uid] => 1                 [status] => 1                 [created] => 1364217732                 [changed] => 1367581312                 [comment] => 0                 [promote] => 0                 [moderate] => 0                 [sticky] => 0                 [tnid] => 0                 [translate] => 0                 [vid] => 9406                 [revision_uid] => 1                 [title] => title text                 [body] => "body text"     } 

protected (and same private) members/properties/variables of class not directly accessible out of class or not accessible directly class object. need write class member function access protected object array of class

class courseobjectcontent {     protected $node;      //member function access 'protected' members of class     function accessobjectarray(){         //todo:your code access protected object array     }     //other member functions } 

Comments