note 102803 added to language.oop5.interfaces

From: Date: Mon, 07 Mar 2011 16:27:55 +0000
Subject: note 102803 added to language.oop5.interfaces
Groups: php.notes 
Request: Send a blank email to php-notes+get-177630@lists.php.net to get a copy of this message
To thanhn2001 at gmail dot com : Neither a bug nor a feature, it is because of the main functionality of interfaces. If you inherits a class B to a A, with A which implements an interface iInterface, B is not implementing it. For example: <?php interface iMy { public function king(); } class A implements iMy { public function king() { } // otherwise, Fatal Error } class B extends A { } // no Fatal Error ?> But if you explicitely ask an implement of iMy in B... <?php interface iMy { public function king(); } class A implements iMy { public function king() { } // otherwise, Fatal Error } class B extends A implements iMy { } // Fatal Error ?> So, in your case, there is no "overwrite". ---- Server IP: 69.147.83.197 Probable Submitter: 90.80.39.42 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.interfaces.php Edit -- https://master.php.net/note/edit/102803 Del: integrated -- https://master.php.net/note/delete/102803/integrated Del: useless -- https://master.php.net/note/delete/102803/useless Del: bad code -- https://master.php.net/note/delete/102803/bad+code Del: spam -- https://master.php.net/note/delete/102803/spam Del: non-english -- https://master.php.net/note/delete/102803/non-english Del: in docs -- https://master.php.net/note/delete/102803/in+docs Del: other reasons-- https://master.php.net/note/delete/102803 Reject -- https://master.php.net/note/reject/102803 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#177630) next »