Re: Classes - Dumb question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 2:44 PM +0100 10/12/07, Stut wrote:
You can limit the need to add more code like so...

function customer($whatWas, $customertype, $whatAdditional)
{
    /* do "what was" (i.e., common to all) */
    /* then do what's additional unique to type */
    $func = strtolower($customertype).'Customer';
    $func($whatAdditional);
}

That's something I haven't seen before (in this language) -- that's slick.

Thanks,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux