NYCPHP Meetup

NYPHP.org

[nycphp-talk] Intellectual Monday

Baer, Jon jbaer at VillageVoice.com
Mon Jan 22 17:15:24 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I must say that both techniques *can* lead to hell when debugging.

The idea of adding new methods ontop of existing classes is usually not
safe if not documented well.  The one thing I liked about the
verbose-ness of Java is the fact that I always knew what I was getting
back (and so did the next function I was calling).  

In PHP I think runkit (http://php.net/manual/en/ref.runkit.php) is the
closest resembling these type of functions.  I could be wrong.

- - Jon

- -----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of Cliff Hirsch
Sent: Monday, January 22, 2007 1:49 PM
To: talk at lists.nyphp.org
Subject: [nycphp-talk] Intellectual Monday

I have been digging into JavaScript and jQuery, and am intrigued by
several concepts.
 
1. jQuery uses chaining, whereby every method within jQuery returns the
query object itself.
 
2. JavaScript's prototype method is an interesting concept for adding
methods to existing classes.
 
I wonder how these techniques work in the PHP world. Does anyone use
chaining effectively? Is there a PHP equivalent to the prototype
concept?
 
Cliff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iD8DBQFFtTd899e5DI8C/rsRAr7iAJoCLd8vFe+6BelimHh9qAyeaXJOLwCgrO0H
aKBO5dRU1neQgkNXqnwWB1M=
=Tm7u
-----END PGP SIGNATURE-----



More information about the talk mailing list