News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Alex Netkachov's Blog:
PHP fluent API tips
October 29, 2007 @ 07:57:00

In response to Travis Swicegood's post about fluent APIs, Alex Netkachov has added some of his own examples to the topic from the Zend Framework and the popular Javascript library, jQuery.

In his recent post Travis Swicegood is talking about the "Fluent API". This kind of API is very popular in scripting languages and I use it during my work with Zend Framework or jQuery projects. Another good example of such technique is Document Object Model API.

His examples show the method chaining that's the hallmark of fluent interfaces. Unfortunately, there's no good way to just make an object and call a fluent interface on it in PHP, so Alex suggests a simple little wrapper (that just returns the object) to make it easier.

0 comments voice your opinion now!
fluent api tip zendframework jquery wrapper object fluent api tip zendframework jquery wrapper object


blog comments powered by Disqus

Similar Posts

Padraic Brady's Blog: Zend Framework Blog Tutorial - Part 7: Authorisation with Zend_Acl & Styling

Cal Evans' Blog: Zend's new namespace converter

Wojciech Sznapka's Blog: Accessing private object property from other object in PHP

Andi Gutmans' Blog: Zend Framework to be part of Ubuntu!

Jim Wynia's Blog: Tracking Accomplishments with PHP, Google Calendar and Zend Framework


Community Events

Don't see your event here?
Let us know!


php7 performance podcast extension laravel community release introduction series api opinion version application voicesoftheelephpant conference symfony2 example framework library interview

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework