mikeandpop
New Member
I have a question about extending a class in PHP.The examples I see on the php site just have 1 line of code in the method...is it the same if the method has tons of code??If this is the base class:\[code\]class BaseClass { public function WithWayTooMuchCode { // like 100 lines of code here }}\[/code\]Then do I have to copy all the code over if I want to use the same method, but change only 1 or 2 things?\[code\]class MyOwnClass extends BaseClass { public function WithWayTooMuchCode { // like 100 lines of code here // do I have to copy all of the other code and then add my code?? }}\[/code\]This seems a little not DRY to me...