Skip to content

Instantly share code, notes, and snippets.

@vasildakov-zz
Created July 16, 2015 07:14
Show Gist options
  • Save vasildakov-zz/41bbf3a798f645d477fa to your computer and use it in GitHub Desktop.
Save vasildakov-zz/41bbf3a798f645d477fa to your computer and use it in GitHub Desktop.
Report
<?php
interface Report {
}
<?php
class UserReport implements Report {
/**
* @var Doctrine\ORM\Query
*/
private $query;
/**
* @var OutputInterface
*/
private $output;
public function __construct()
{
$this->query = $query;
}
}
<?php
namespace Application\Repository;
use Doctrine\ORM\EntityRepository;
class UserRepository extends EntityRepository
{
/**
* @returns Doctrine\ORM\Query $query
*/
public function findAllUsersWithLicense()
{
$qb = $this->_em->createQueryBuilder();
$qb->select('u');
$qb->from('Application\Entity\User', 'u');
// more conditions here
return $qb->getQuery();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment