News Feed
Sections




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

ProDevTips.com:
Extending PHP Doctrine Record - Check Box Groups
August 12, 2008 @ 13:26:36

In the third part of the series dealing with using Doctrine in your PHP applications, ProDevTips has this third part looking at a method for extending the tool's current functionality.

I simply knew we would need the extension capability that the Mdl class allows for sooner or later, I didn't expect it to be this soon though. The main problem here is saving a many to many relationship straight to the database from the $_POST array, to do that we can extend Doctrine Record with a new function I have named fromArrayExt which adds something extra to the normal fromArray method.

He shows how to extend the classes to create custom handlers for a grouping of checkboxes. The new code automatically handles their submitted values and pushes them directly into the database (with a simple save() call).

0 comments voice your opinion now!
doctrine record tutorial checkbox extend group


blog comments powered by Disqus

Similar Posts

DevShed: Using Conditional Statements with the Xdebug Extension

Francesco Tassi: Switching From TDD to BDD With Behat and Symfony2

Brandon Savage: Compiling PHP 5.5 From Scratch

Pádraic Brady's Blog:Doing that thing called PEAR - Packaging Source Code for PEAR Distribution

Ben Ramsey\'s Blog: Peruser MPM for Apache


Community Events

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


voicesoftheelephpant interview release version introduction podcast laravel laravel5 api language opinion framework wordpress community extension php7 library list series example

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