Specification pattern implemented in PHP