Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #23665 Create an interface for TranslationWriter (Nyholm)
This PR was squashed before being merged into the 3.4 branch (closes #23665). Discussion ---------- Create an interface for TranslationWriter | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | ~~~no~~~ yes | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | We should provide an interface for the TranslationWriter. This allows other libraries (php-translation) that depend on the Translation component provide different implementations. Commits ------- c25eafa Create an interface for TranslationWriter
- Loading branch information
Showing
7 changed files
with
89 additions
and
10 deletions.
There are no files selected for viewing
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
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
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
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
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
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
34 changes: 34 additions & 0 deletions
34
src/Symfony/Component/Translation/Writer/TranslationWriterInterface.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Translation\Writer; | ||
|
||
use Symfony\Component\Translation\Exception\InvalidArgumentException; | ||
use Symfony\Component\Translation\MessageCatalogue; | ||
|
||
/** | ||
* TranslationWriter writes translation messages. | ||
* | ||
* @author Michel Salib <michelsalib@hotmail.com> | ||
*/ | ||
interface TranslationWriterInterface | ||
{ | ||
/** | ||
* Writes translation from the catalogue according to the selected format. | ||
* | ||
* @param MessageCatalogue $catalogue The message catalogue to write | ||
* @param string $format The format to use to dump the messages | ||
* @param array $options Options that are passed to the dumper | ||
* | ||
* @throws InvalidArgumentException | ||
*/ | ||
public function write(MessageCatalogue $catalogue, $format, $options = array()); | ||
} |