note 58664 added to language.oop5.overloading

From: Date: Fri, 11 Nov 2005 09:07:46 +0000
Subject: note 58664 added to language.oop5.overloading
Groups: php.notes 
Request: Send a blank email to php-notes+get-98416@lists.php.net to get a copy of this message
Regarding the code posted by this user: mileskeaton at gmail dot com 23-Dec-2004 03:23 There's no need to loop over your entire object. I do this lots and all you need to do is convert the method name used into the name of a property, then check if (isset($this->{$property_name})) { //Get ready to do a set } I usually check if the developer called a get or set and also do some snity checking on the type of property they're requesting. ---- Manual Page -- http://www.php.net/manual/en/language.oop5.overloading.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+58664 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58664&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58664&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58664&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58664&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58664&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58664&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58664&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+58664&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#98416) next »