I'm having difficulties to create params array for ZF2 where I can do a where / or
I know that orWhere is removed as of ZF2 but there are workaround which I can't get working:
use Zend\Db\Sql\Predicate;
$params = array(
'select' => implode(', ', array(
'`user`.`id`',
'`user`.`username`',
'`user`.`firstname`',
'`user`.`middlename`',
'`user`.`lastname`',
'`user`.`externalEmail`',
'`user`.`email`',
)),
"where" => implode(
new Predicate\PredicateSet(
array(
new Predicate\Like( '`user`.`email` = :email'),
new Predicate\Like( '`user`.`email2` = :email'),
),
Predicate\PredicateSet::COMBINED_BY_OR
)
), ...
I thought this was the way todo but it seems not.