[nycphp-talk] Intellectual Monday
rmarscher at beaffinitive.com
Mon Jan 22 15:37:51 EST 2007
A lot of the methods in the Zend Framework classes use object chaining.
doesn't have a traditional object implementation -- you can't say "class
A extends class B" -- and the lines are pretty blurred between what a
function is and what an object is, so that why you kind of have to hack
it via the prototype object to achieve some sense of object-oriented
Here's the idea of object chaining in php:
$this->other = new OtherClass();
echo "Something Else\n";
$foo = new SomeClass();
> On 1/22/07, Cliff Hirsch <cliff at pinestream.com> wrote:
>> I wonder how these techniques work in the PHP world. Does anyone use
>> chaining effectively? Is there a PHP equivalent to the prototype
> say that, and I think Netscape could have done so much more "back in
> the day" to produce good documentation and examples. That's what
> Prototype, MochiKit, jQuery, et al are finally doing.
> Anyway, PHP's object support doesn't really compare. Classes are not
> the same as prototypes. And not everything in PHP is an object,
> therefore chaining is a kludge at best.
>> From the point of view of readability and maintainability, I hope
More information about the talk