[nycphp-talk] PHP 5 Interfaces
David Mintz
vtbludgeon at gmail.com
Tue Jun 2 12:22:52 EDT 2009
We might add that interfaces can be useful for type-hinting in your method
signature, possibly saving you some extra defensive-coding and checking what
was passed in.
public function doSomething(Fooable $fooable) {
// you can count on $fooable implementing Fooable
// or you won't get this far w/o a fatal
}
--
David Mintz
http://davidmintz.org/
The subtle source is clear and bright
The tributary streams flow through the darkness
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20090602/d4eda8b0/attachment.html>
More information about the talk
mailing list