atk4/atk4 — pull request #527 by DarkSide666 (2014-05-09 13:20:56+00:00)
Title: addCondition now can be used with "OR" conditions too

I moved most of code out of `addCondition` method to new (private)
method `addConditionToDSQL` because I needed to make it more
"configurable" and it's code can be reused.

Example:
$m->addCondition(array(
array($q->expr('now()'),array(1,5,7)),
array('doc_prepared',$m->getField('doc_sent')),
$q->expr('foo()'),
))->addCondition('name','like','%SIA%');

will generate following SQL:
WHERE (now() in (1,5,7) OR doc_prepared=doc_sent OR foo()) AND name like
'%SIA%'

Model fields doc_prepared and doc_sent can be calculated fields too :)