Reputation: 3033
How can I use Reflection to extend a class in runtime?
I need A class is extended from B class.
class A{
function methodA()
{
echo 'This is method A';
}
}
class B{
function methodB()
{
echo 'This is method B';
}
}
Upvotes: 3
Views: 1112
Reputation: 31559
You cannot. As the name suggests, Reflection is for reflection alone, gathering data about the code, and not modification.
Upvotes: 2