Tag Archives: orm

Trans­lat­ing vari­able strings with get­text or “How to trans­late Doctrine’s enums”

Trans­lat­ing of some­thing with get­text is well-discussed prob­lem, so there’s no need to dis­cuss it again. Everything works like a charm, when you deal­ing with string con­stants. But what to do if you need to trans­late a string retrieved from some vari­able, … Con­tinue read­ing

Posted in Development, Doctrine ORM | Tagged , , , , | Leave a comment

Com­plex mutat­ors for Doc­trine v.1.x, REVISITED

After I have star­ted to imple­ment pro­posed in pre­vi­ous post com­plex mutator I found that it’s not really as good as I thought. Well for one model it prob­ably is OK. And of course if it can be used with exten­ded Doctrine_Record class … Con­tinue read­ing

Posted in Doctrine ORM | Tagged , , , , , | Leave a comment

Com­plex mutat­ors for Doctrine v.1.x

If you work with Doc­trine ORM you prob­ably met situ­ation when you need to mangle val­ues on set­ting or get­ting them. Espe­cially when you are using dif­fer­ent types. One of such prob­lems are dates. As I’m using Zend Frame­work I prefer … Con­tinue read­ing

Posted in Doctrine ORM | Tagged , , , , , | 2 Comments

Bind model to the Zend_Form…

In my pre­vi­ous post I have described how to fill model with val­ues from the Zend_Form. But reverse pro­cess is also very import­ant. If you are using Zend_Db_Table you prob­ably will not need any spe­cial meth­ods as you can use Zend_Form::setDefault($array) … Con­tinue read­ing

Posted in Zend Framework | Tagged , , , | 1 Comment

Bind Zend_Form val­ues to the model. Part 2 (Array-type properties)

In my pre­vi­ous post I’ve added a simple bind­ing func­tion­al­ity to Zend_Form. But once I’ve imple­men­ted it in real world with Doc­trine PHP ORM as my BLL, I found that it can’t work seam­lessly with my model’s prop­er­ties of array type. In … Con­tinue read­ing

Posted in Zend Framework | Tagged , , , | Leave a comment