note 94248 added to language.oop5.interfaces

From: Date: Sun, 25 Oct 2009 10:13:32 +0000
Subject: note 94248 added to language.oop5.interfaces
Groups: php.notes 
Request: Send a blank email to php-notes+get-162043@lists.php.net to get a copy of this message
I have an ambiguity about interfaces in programming languages I've worked with(PHP and Java). Everywhere I heard that an interface is just a way for enforcing subclasses to include all the functions declared in the interface. This seems completely clear but the ambiguity begins when it seems that sometimes interfaces do certain actions(Especially or maybe always in internal interfaces). For example I’ve seen a simple class does iteration by just implementing an interface and by removing the implemented interface the class iteration does not work! I’ve also seen that in Java when you implement an interface the “Event Handling” does work and without implementing its interfaces it doesn’t! I really appreciate if someone makes it clear for me to some extent. ---- Server IP: 79.132.192.3 Probable Submitter: 217.218.254.42 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.interfaces.php Edit -- https://master.php.net/note/edit/94248 Del: integrated -- https://master.php.net/note/delete/94248/integrated Del: useless -- https://master.php.net/note/delete/94248/useless Del: bad code -- https://master.php.net/note/delete/94248/bad+code Del: spam -- https://master.php.net/note/delete/94248/spam Del: non-english -- https://master.php.net/note/delete/94248/non-english Del: in docs -- https://master.php.net/note/delete/94248/in+docs Del: other reasons-- https://master.php.net/note/delete/94248 Reject -- https://master.php.net/note/reject/94248 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#162043) next »