src/Zicht/Bundle/MessagesBundle/Entity/MessageRepository.php
public function getTranslations($locale, $domain)
    {
        $conn = $this->getEntityManager()->getConnection();
        $stmt = $conn->executeQuery(
            'SELECT m.message, t.translation FROM message m JOIN message_translation t ON (t.message_id = m.id AND t.locale = ? ) WHERE m.domain = ?',
            [$locale, $domain]
        );
        while ($row = $stmt->fetch()) {
            yield $row['message'] => $row['translation'];
        }
    }
public function getTranslations($locale, $domain)
    {
        $conn = $this->getEntityManager()->getConnection();
        $stmt = $conn->executeQuery(
            'SELECT m.message, t.translation FROM message m JOIN message_translation t ON (t.message_id = m.id AND t.locale = ? ) WHERE m.domain = ?',
            [$locale, $domain]
        );
        while ($row = $stmt->fetch()) {
            yield $row['message'] => $row['translation'];
        }
    }
public function getTranslations ( $ locale , $ domain ) { $ conn = $ this -> getEntityManager ( ) -> getConnection ( ) ; $ stmt = $ conn -> executeQuery ( 'SELECT m.message, t.translation FROM message m JOIN message_translation t ON (t.message_id = m.id AND t.locale = ? ) WHERE m.domain = ?' , [ $ locale , $ domain ] ) ; while ( $ row = $ stmt -> fetch ( ) ) { yield $ row [ 'message' ] => $ row [ 'translation' ] ; } }
Returns all translations for the specified domain

@param string $locale
@param string $domain
@return \Generator
Returns all translations for the specified domain