1
什麼是正確的語法來訪問的身體,因爲這些對象不是陣列和父對象爲節點:保護訪問受保護的對象數組
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"
}
繼承或父類可以訪問受保護的瓦爾/法的保護對象數組。私人變量/方法只能從班級訪問。 – 2013-05-06 17:24:05