mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 04:53:26 +00:00
30 lines
640 B
PHP
30 lines
640 B
PHP
<?php
|
|
|
|
namespace Repositories;
|
|
|
|
use Doctrine\ORM\EntityRepository;
|
|
use Entities\Feed;
|
|
|
|
/**
|
|
* AggregateTokenRepository
|
|
*
|
|
* This class was generated by the Doctrine ORM. Add your own custom
|
|
* repository methods below.
|
|
*/
|
|
class AggregateTokenRepository extends EntityRepository
|
|
{
|
|
public function findByUser(\User_Adapter $user)
|
|
{
|
|
$dql = 'SELECT t
|
|
FROM Entities\AggregateToken t
|
|
WHERE t.usr_id = :usr_id';
|
|
|
|
$query = $this->_em->createQuery($dql);
|
|
$query->setParameters(array(
|
|
':usr_id' => $user->get_id())
|
|
);
|
|
|
|
return $query->getOneOrNullResult();
|
|
}
|
|
}
|