12
12
namespace Symfony \Component \Intl \Data \Generator ;
13
13
14
14
use Symfony \Component \Filesystem \Filesystem ;
15
- use Symfony \Component \Intl \Data \Bundle \Compiler \GenrbCompiler ;
16
- use Symfony \Component \Intl \Data \Bundle \Reader \BundleReaderInterface ;
15
+ use Symfony \Component \Intl \Data \Bundle \Compiler \BundleCompilerInterface ;
16
+ use Symfony \Component \Intl \Data \Bundle \Reader \BundleEntryReader ;
17
+ use Symfony \Component \Intl \Data \Bundle \Reader \BundleEntryReaderInterface ;
17
18
use Symfony \Component \Intl \Data \Bundle \Reader \IntlBundleReader ;
18
19
use Symfony \Component \Intl \Data \Util \LocaleScanner ;
19
20
@@ -29,7 +30,7 @@ abstract class AbstractDataGenerator
29
30
private $ compiler ;
30
31
private $ dirName ;
31
32
32
- public function __construct (GenrbCompiler $ compiler , $ dirName )
33
+ public function __construct (BundleCompilerInterface $ compiler , $ dirName )
33
34
{
34
35
$ this ->compiler = $ compiler ;
35
36
$ this ->dirName = (string ) $ dirName ;
@@ -39,7 +40,7 @@ public function generateData(GeneratorConfig $config)
39
40
{
40
41
$ filesystem = new Filesystem ();
41
42
$ localeScanner = new LocaleScanner ();
42
- $ reader = new IntlBundleReader ();
43
+ $ reader = new BundleEntryReader ( new IntlBundleReader () );
43
44
44
45
$ writers = $ config ->getBundleWriters ();
45
46
$ tempDir = sys_get_temp_dir ().'/icu-data- ' .$ this ->dirName ;
@@ -98,36 +99,32 @@ public function generateData(GeneratorConfig $config)
98
99
abstract protected function scanLocales (LocaleScanner $ scanner , $ sourceDir );
99
100
100
101
/**
101
- * @param GenrbCompiler $compiler
102
- * @param string $sourceDir
103
- * @param string $tempDir
102
+ * @param string $sourceDir
103
+ * @param string $tempDir
104
104
*/
105
- abstract protected function compileTemporaryBundles (GenrbCompiler $ compiler , $ sourceDir , $ tempDir );
105
+ abstract protected function compileTemporaryBundles (BundleCompilerInterface $ compiler , $ sourceDir , $ tempDir );
106
106
107
107
abstract protected function preGenerate ();
108
108
109
109
/**
110
- * @param BundleReaderInterface $reader
111
- * @param string $tempDir
112
- * @param string $displayLocale
110
+ * @param string $tempDir
111
+ * @param string $displayLocale
113
112
*
114
113
* @return array|null
115
114
*/
116
- abstract protected function generateDataForLocale (BundleReaderInterface $ reader , $ tempDir , $ displayLocale );
115
+ abstract protected function generateDataForLocale (BundleEntryReaderInterface $ reader , $ tempDir , $ displayLocale );
117
116
118
117
/**
119
- * @param BundleReaderInterface $reader
120
- * @param string $tempDir
118
+ * @param string $tempDir
121
119
*
122
120
* @return array|null
123
121
*/
124
- abstract protected function generateDataForRoot (BundleReaderInterface $ reader , $ tempDir );
122
+ abstract protected function generateDataForRoot (BundleEntryReaderInterface $ reader , $ tempDir );
125
123
126
124
/**
127
- * @param BundleReaderInterface $reader
128
- * @param string $tempDir
125
+ * @param string $tempDir
129
126
*
130
127
* @return array|null
131
128
*/
132
- abstract protected function generateDataForMeta (BundleReaderInterface $ reader , $ tempDir );
129
+ abstract protected function generateDataForMeta (BundleEntryReaderInterface $ reader , $ tempDir );
133
130
}
0 commit comments