note 80202 added to language.oop5.interfaces

From: Date: Fri, 04 Jan 2008 04:18:41 +0000
Subject: note 80202 added to language.oop5.interfaces
Groups: php.notes 
Request: Send a blank email to php-notes+get-134753@lists.php.net to get a copy of this message
In regards to what Hayley Watson is writing: The "interface" is a method of enforcing that anyone who implements it must include all the functions declared in the interface. This is an abstraction method, since you cannot just declare a base class and do something like "public abstract function myTest();" and later on extend that class. If you don't override the default value in a parameter list, it's assumed that the default value was received by time you have any control to read or relay the value on again. There should be no problem in having all or none of your parameters in an interface having a default value, as the value is "auto-filled" if not explicitly provided. I just came across interfaces in PHP.. but I use them quite a bit in Java and Delphi. Currently building different DB wrappers, but all must enforce common access using a base class.. and also enforce that all of specific routines are implemented. ---- Server IP: 208.69.120.35 Probable Submitter: 76.28.182.137 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.interfaces.php Edit -- https://master.php.net/note/edit/80202 Del: integrated -- https://master.php.net/note/delete/80202/integrated Del: useless -- https://master.php.net/note/delete/80202/useless Del: bad code -- https://master.php.net/note/delete/80202/bad+code Del: spam -- https://master.php.net/note/delete/80202/spam Del: non-english -- https://master.php.net/note/delete/80202/non-english Del: in docs -- https://master.php.net/note/delete/80202/in+docs Del: other reasons-- https://master.php.net/note/delete/80202 Reject -- https://master.php.net/note/reject/80202 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#134753) next »