News Feed
Sections




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

Federico Cargnelutti's Blog:
Implementing Dynamic Finders and Parsing Method Expressions
March 23, 2010 @ 13:07:47

In a new post to his blog Federico Cargnelutti takes a look at features available in Ruby and Grails - dynamic finders and method expressions and introduces a PHP library that can parse them.

A dynamic finder method looks like a normal method invocation, but the method itself doesn't exist, instead, the method is generated dynamically and processed via another method at runtime. [...] A method expression is made up of the prefix such as "findBy" followed by an expression that combines one or more properties.

He includes a few examples of each, the finders and expressions, and talks about the class he's developed to handle the method expressions in PHP. It's based on a simple format defining the method, attribute, expression and operator. Code snippet examples are included for SQL statement generation and object parsing. The code for the class is included in the post.

0 comments voice your opinion now!
finder method expression dynamic tutorial


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Accessing DB2 Data Inside of i5/OS

Bhaskar Karambelkar\'s Blog: Prototyping LAMP with WAMP

NetTuts.com: Aspect-Oriented Programming in PHP with Go!

PHP-GTK Community Site: GtkToolbar, GtkMenubar, and PEAR XML-RPC for geo-nick

Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 8)


Community Events

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


install introduction php7 community library series symfony2 api configure release conference performance application podcast example laravel interview language framework opinion

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