src/Zicht/Bundle/MessagesBundle/Entity/MessageRepository.php
public function getDomains()
    {
        $q = $this
            ->createQueryBuilder('m')
            ->select('m.domain')
            ->distinct()
            ->orderBy('m.domain');

        $ret = array();
        foreach ($q->getQuery()->execute() as $result) {
            $ret[$result['domain']] = $result['domain'];
        }
        return $ret;
    }
public function getDomains()
    {
        $q = $this
            ->createQueryBuilder('m')
            ->select('m.domain')
            ->distinct()
            ->orderBy('m.domain');

        $ret = array();
        foreach ($q->getQuery()->execute() as $result) {
            $ret[$result['domain']] = $result['domain'];
        }
        return $ret;
    }
public function getDomains ( ) { $ q = $ this -> createQueryBuilder ( 'm' ) -> select ( 'm.domain' ) -> distinct ( ) -> orderBy ( 'm.domain' ) ; $ ret = array ( ) ; foreach ( $ q -> getQuery ( ) -> execute ( ) as $ result ) { $ ret [ $ result [ 'domain' ] ] = $ result [ 'domain' ] ; } return $ ret ; }
Returns all domains that are defined in the database

@return array
Returns all domains that are defined in the database