*/ class ReminderStore { protected ReminderRepositoryQuery $query; public function __construct(ReminderRepositoryQuery $query) { $this->query = $query; } public function getFoo($query = null) { if (!$query) { $query = $this->query->create(); } return $query ->useCustomFilters() ->andWhere('.description = :description') ->setParameter(':description', 'ahah') ->findOne(); } }