File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ will save a few lines::
8585
8686 class MyFormatDumper extends FileDumper
8787 {
88- protected function format (MessageCatalogue $messages, $domain = 'messages' )
88+ public function formatCatalogue (MessageCatalogue $messages, $domain, array $options = array() )
8989 {
9090 $output = '';
9191
@@ -102,7 +102,14 @@ will save a few lines::
102102 }
103103 }
104104
105- The :method: `Symfony\\ Component\\ Translation\\ Dumper\\ FileDumper::format `
105+ .. versionadded :: 2.8
106+ The ability to format a message catalogue without dumping it was introduced in Symfony 2.8.
107+
108+ .. tip ::
109+
110+ To format a message catalogue without dumping it into files use the ``formatCatalogue `` method.
111+
112+ The :method: `Symfony\\ Component\\ Translation\\ Dumper\\ FileDumper::formatCatalogue `
106113method creates the output string, that will be used by the
107114:method: `Symfony\\ Component\\ Translation\\ Dumper\\ FileDumper::dump ` method
108115of the FileDumper class to create the file. The dumper can be used like any other
@@ -116,4 +123,3 @@ YAML file are dumped into a text file with the custom format::
116123
117124 $dumper = new MyFormatDumper();
118125 $dumper->dump($catalogue, array('path' => __DIR__.'/dumps'));
119-
You can’t perform that action at this time.
0 commit comments