Archive for the ‘Doctrine’ Category

PHP Doctrine - adding automatic, simple CRUD

Sunday, October 26th, 2008

I just found myself wishing for automatic CRUD, for quick and simple administrative tasks, as it turned out a very easy thing to add. The first thing we have to do is move the label selection from having to be explicitly declared in the insert/update form - like we are doing now - to the model:... Read More

DQL recipes

Tuesday, September 23rd, 2008

I had to start covering various Doctrine snippets for future reference. This post will be updated with more of them as they appear.... Read More

Pagination with PHP Doctrine

Wednesday, September 3rd, 2008

Things are starting to become more and more feature complete. Let’s look at how to implement general search and pagination. In the Product model:... Read More

File Uploads with PHP Doctrine

Sunday, August 31st, 2008

It’s time to take a look at how file uploads can be integrated into the Doctrine validation and CRUD process. We will have a product in the form of a digital download as an example, it will have a screenshot image that can be maximum 250 pixels wide and high. The download itself will be a zipped file.... Read More

CRUD with PHP Doctrine

Sunday, August 24th, 2008

This piece is building on the prior tutorial, we now have Retrieve, Update and Delete in addition to the Create stuff. The prior tutorial has also been updated since the fromArrayExt method needed some adjustments to manage updating.... Read More

Extending PHP Doctrine Record - Check Box Groups

Monday, August 11th, 2008

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.... Read More

Smarty and Doctrine combination

Friday, August 8th, 2008

I’ve had problems with both Zend Session and the Zend Controller. It just feels like too much fighting and since the plan is to replace Zend DB with Doctrine there is only the controller and session left and unwanted to boot.


The session logic can easily be replicated in a more lightweight form, so can the routing and that is what this tutorial is about. We are creating an MVC setup where M is Doctrine, V is Smarty and C is our own stuff we do here. The Zend Framework has been reduced to just another component library for me now, I will pick goodies when I need them.... Read More

PHP Doctrine introduction for dummies

Tuesday, August 5th, 2008

It was long overdue but finally I’ve taken a look at Doctrine. And I’m blown away, bye bye Zend DB.... Read More