コード例 #1
0
 public function parseDql($dql, $hints = array())
 {
     $query = $this->_em->createQuery($dql);
     $query->setHint(Query::HINT_FORCE_PARTIAL_LOAD, true);
     $query->setDql($dql);
     foreach ($hints as $key => $value) {
         $query->setHint($key, $value);
     }
     $parser = new \Doctrine\ORM\Query\Parser($query);
     // We do NOT test SQL output here. That only unnecessarily slows down the tests!
     $parser->setCustomOutputTreeWalker('Doctrine\\Tests\\Mocks\\MockTreeWalker');
     return $parser->parse();
 }