Created
July 16, 2015 07:14
-
-
Save vasildakov-zz/41bbf3a798f645d477fa to your computer and use it in GitHub Desktop.
Report
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface Report { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class UserReport implements Report { | |
/** | |
* @var Doctrine\ORM\Query | |
*/ | |
private $query; | |
/** | |
* @var OutputInterface | |
*/ | |
private $output; | |
public function __construct() | |
{ | |
$this->query = $query; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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