note 21927 added to function.is-a

From: Date: Fri, 31 May 2002 11:29:13 +0000
Subject: note 21927 added to function.is-a
Groups: php.notes 
Request: Send a blank email to php-notes+get-31271@lists.php.net to get a copy of this message
An example of a good type of class which doesnt need any values (just functions) is an object which is a string processor of some kind. This way you can do things like $sqlString .= $mySearchBox->getQueryFragment(new MyStringProcessor()); ... which avoids the need to use callbacks or to create many extended versions of MySearchBox. So, "empty" objects are both legal, and very useful. -- http://www.php.net/manual/en/function.is-a.php http://master.php.net/manage/user-notes.php?action=edit+21927 http://master.php.net/manage/user-notes.php?action=delete+21927 http://master.php.net/manage/user-notes.php?action=reject+21927

« previous php.notes (#31271) next »