I used the code below to get the object's property
_items:protected
, but no
luck.
$obj =
JSite::getMenu();
print_r($obj->_items:protected);
Object
output
JMenuSite
Object
(
[_items:protected] => Array
(
[101] => stdClass Object
(
[id] =>
101
[menutype] =>
mainmenu
Anyone know
what wrong with my code? Thanks.
class="normal">Answer
You are trying to access a
protected property from outside the class.
A protected property can only be
accessed from within the class itself or classes that inherit from that
class.
Read up on OOP access
modifiers.
No comments:
Post a Comment