Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 11th, 2012  |  syntax: None  |  size: 0.38 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3.  
  4. class Application_Service_Website
  5. {
  6.         public function lookup()
  7.         {
  8.         $registry = Zend_Registry::getInstance();
  9.         $this->em = $registry->entityManager;          
  10.                
  11.                 $qb = $this->em->createQueryBuilder();
  12.  
  13.                 $qb->select('u')
  14.                    ->from('Application_Model_Product', 'u');
  15.                 $query = $qb->getQuery();
  16.                
  17.                 $array = $query->getScalarResult();
  18.                
  19.                 return $array;
  20.         }
  21. }