How to use a protected function from another class |
Class A
PHP Code: <?php Class B: PHP Code: <?php Error Call to protected method... How can I get the 'a' in Class B
You don't get access to a() just because you extend from the same base class. You should probably look into using traits instead.
Read this: PHP.NET - Visibility
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |