Symfony 2 Doctrine find by ordered array of id
You can use it like:
$cardRepository->findBy( array('id' => $idsArray), array('id' => 'DESC') );
Check also the official doctrine documentation for more details on how to use ordering, limit and offset as second to fourth parameters in the findBy
method.