Original Content
  

Method Chaining in Zend Framework

Chris Hope has a brief blog post explaining how to use method chaining in Zend Framework. He provides a basic example of how method chaining works using the Zend_Mail component, and offers the following simple rule to help readers understand the concept:

“If you then had foo(), bar(), baz(), and bat() methods you could then do this:

$myobject->foo()->bar()->baz()->bat();


Read the full post here.

Published: December 20th, 2008 at 9:36
Categories: Zend Framework
Tags: