maul-esel/ALD-API — pull request #31 by maul-esel (2013-03-24 23:10:38+00:00)
Title: Rework filter implementation

Replace the old clumsy and unreadable way of appending to a `$db_cond` variable by a cleaner way to define possible filters and evaluate them based on the actually present filters.

This PR adds a `FilterHelper` class whose `add()` lets the called define possible filters in various, but still readable ways.
In the end, the array of actually present filters is given to `evaluate()`, which compares it to the stored filters and returns a ready-to-use MySQL `WHERE` condition.