|
-
March 28th, 2011, 05:13 AM
#1
OO: Why get warnings? indirect inheritance
Why get warnings?
Strict Standards: Declaration of circle::resize() should be compatible with that of shape::resize() in C:\xampp\htdocs\Stobart2008\ch17\circle.php on line 4
Strict Standards: Declaration of square::resize() should be compatible with that of shape::resize() in C:\xampp\htdocs\Stobart2008\ch17\square.php on line 17
I receive such messages when run
function resize($intSize) { // this on circle or square class
parent::resize($intSize, $intSize);
}
where parent::resize on shape class ... when run a function from square (or circle) extends rectangle (or ellipse) both extend shape,... in other words when in a class[eg square] function (class extends indirectly)...eg shape class. I get these warnings when extend directly [eg rectangle], these no appear...well how fix?
-
March 28th, 2011, 09:22 AM
#2
Re: OO: Why get warnings? indirect inheritance
PHP is one of a few languages that's not completely OOP. It does not support method overloading.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|