note 108040 added to language.oop5.overloading

From: Date: Fri, 23 Mar 2012 21:35:58 +0000
Subject: note 108040 added to language.oop5.overloading
Groups: php.notes 
Request: Send a blank email to php-notes+get-186797@lists.php.net to get a copy of this message
A word of warning! It may seem obvious, but remember, when deciding whether to use __get, __set, and __call as a way to access the data in your class (as opposed to hard-coding getters and setters), keep in mind that this will prevent any sort of autocomplete, highlighting, or documentation that your ide mite do. Furthermore, it beyond personal preference when working with other people. Even without an ide, it can be much easier to go through and look at hardcoded member and method definitions in code, than having to sift through code and piece together the method/member names that are assembled in __get and __set. If you still decide to use __get and __set for everything in your class, be sure to include detailed comments and documenting, so that the people you are working with (or the people who inherit the code from you at a later date) don't have to waste time interpreting your code just to be able to use it. ---- Server IP: 69.147.83.197 Probable Submitter: 74.128.192.171 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.overloading.php Edit -- https://master.php.net/note/edit/108040 Del: integrated -- https://master.php.net/note/delete/108040/integrated Del: useless -- https://master.php.net/note/delete/108040/useless Del: bad code -- https://master.php.net/note/delete/108040/bad+code Del: spam -- https://master.php.net/note/delete/108040/spam Del: non-english -- https://master.php.net/note/delete/108040/non-english Del: in docs -- https://master.php.net/note/delete/108040/in+docs Del: other reasons-- https://master.php.net/note/delete/108040 Reject -- https://master.php.net/note/reject/108040 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#186797) next »