News Feed
Sections




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

Eli White's Blog:
An intriguing use of lambda functions
March 11, 2010 @ 08:48:16

In a new post to his blog today Eli White takes a look at an interesting use of lambda functions he's figured out for a his development at work.

I found a very specific use out of the blue of Lambda functions that I have now used and I see as a great use-case. Which is specifically passing functions/logic from your Controller to your View. In the case of Goodsie, I'm using PHP for my templating language and as usual I'm trying to remove as much logic from my View as possible, while still allowing the view to be malleable.

His method centered around a pagination subview that he wanted to make flexible enough to work with both the standard page view and with an ajax request. Lambda functions came to the rescue by dynamically creating a function based on the request need.

0 comments voice your opinion now!
lambda function pagination subview tutorial


blog comments powered by Disqus

Similar Posts

Gonzalo Ayuso: Integrating WebSockets with PHP applications. Silex and socket.io playing together.

Benjamin Schneider's Blog: Use PHP's Tidy extension to validate your (X)HTML markup

AWS PHP Development: Testing Webhooks Locally for Amazon SNS

I/O Reader: 15 Cool Things & 12 Things to Dislike About PHP

Matthew Weier O'Phinney: Apigility: Using RPC with HAL


Community Events





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


zendserver list podcast release tips deployment development bugfix symfony language laravel code series threedevsandamaybe introduction conference api community interview framework

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