Version Description
(14.01.2020) = * Reworked main plugin filter * Improved performance by minimizing number of calls * Updated Georgian table * Fixed slug duplication in taxonomies * Fixed warnings with WooCommerce when mbstring is not loaded * Fixed transliteration of draft post slug * Tables sorted by local alphabets
Download this release
Release Info
Developer | mihdan |
Plugin | Cyr-To-Lat |
Version | 4.3.3 |
Comparing to | |
See all releases |
Code changes from version 4.3.2 to 4.3.3
- classes/background-processes/class-post-conversion-process.php +5 -6
- classes/background-processes/class-term-conversion-process.php +5 -6
- classes/class-conversion-tables.php +550 -293
- classes/class-main.php +50 -54
- classes/class-requirements.php +0 -2
- cyr-to-lat.php +3 -3
- lib/polyfill-mbstring/LICENSE +19 -0
- lib/polyfill-mbstring/Mbstring.php +15 -5
- lib/polyfill-mbstring/bootstrap.php +179 -0
- readme.txt +10 -1
- vendor/autoload.php +1 -1
- vendor/composer/ClassLoader.php +2 -2
- vendor/composer/LICENSE +52 -17
- vendor/composer/autoload_files.php +10 -0
- vendor/composer/autoload_real.php +22 -4
- vendor/composer/autoload_static.php +8 -4
- vendor/composer/installers/composer.json +0 -107
- vendor/composer/installers/src/Composer/Installers/AglInstaller.php +0 -21
- vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php +0 -11
- vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php +0 -49
- vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/BaseInstaller.php +0 -136
- vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php +0 -126
- vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php +0 -82
- vendor/composer/installers/src/Composer/Installers/ChefInstaller.php +0 -11
- vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php +0 -10
- vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php +0 -34
- vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php +0 -11
- vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php +0 -13
- vendor/composer/installers/src/Composer/Installers/CraftInstaller.php +0 -35
- vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php +0 -21
- vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php +0 -10
- vendor/composer/installers/src/Composer/Installers/DframeInstaller.php +0 -10
- vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php +0 -50
- vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php +0 -16
- vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php +0 -20
- vendor/composer/installers/src/Composer/Installers/ElggInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php +0 -12
- vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php +0 -29
- vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php +0 -10
- vendor/composer/installers/src/Composer/Installers/FuelInstaller.php +0 -11
- vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/GravInstaller.php +0 -30
- vendor/composer/installers/src/Composer/Installers/HuradInstaller.php +0 -25
- vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php +0 -11
- vendor/composer/installers/src/Composer/Installers/Installer.php +0 -278
- vendor/composer/installers/src/Composer/Installers/ItopInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php +0 -15
- vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php +0 -18
- vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php +0 -11
- vendor/composer/installers/src/Composer/Installers/KnownInstaller.php +0 -11
- vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php +0 -10
- vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php +0 -27
- vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php +0 -10
- vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php +0 -10
- vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php +0 -16
- vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php +0 -11
- vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php +0 -37
- vendor/composer/installers/src/Composer/Installers/MakoInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/MauticInstaller.php +0 -25
- vendor/composer/installers/src/Composer/Installers/MayaInstaller.php +0 -33
- vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php +0 -51
- vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php +0 -119
- vendor/composer/installers/src/Composer/Installers/ModxInstaller.php +0 -12
- vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php +0 -58
- vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php +0 -47
- vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php +0 -24
- vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php +0 -14
- vendor/composer/installers/src/Composer/Installers/OxidInstaller.php +0 -59
- vendor/composer/installers/src/Composer/Installers/PPIInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php +0 -11
- vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php +0 -11
- vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php +0 -21
- vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php +0 -32
- vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php +0 -29
- vendor/composer/installers/src/Composer/Installers/Plugin.php +0 -17
- vendor/composer/installers/src/Composer/Installers/PortoInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php +0 -10
- vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php +0 -11
- vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php +0 -63
- vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php +0 -24
- vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php +0 -10
- vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php +0 -10
- vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php +0 -10
- vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php +0 -22
- vendor/composer/installers/src/Composer/Installers/SMFInstaller.php +0 -10
- vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php +0 -60
- vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php +0 -35
- vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php +0 -25
- vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php +0 -49
- vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php +0 -26
- vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php +0 -16
- vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php +0 -38
- vendor/composer/installers/src/Composer/Installers/TaoInstaller.php +0 -12
- vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php +0 -12
- vendor/composer/installers/src/Composer/Installers/TuskInstaller.php +0 -14
- vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php +0 -10
- vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php +0 -49
- vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php +0 -21
- vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php +0 -9
- vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php +0 -12
- vendor/composer/installers/src/Composer/Installers/YawikInstaller.php +0 -32
- vendor/composer/installers/src/Composer/Installers/ZendInstaller.php +0 -11
- vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php +0 -10
- vendor/composer/installers/src/bootstrap.php +0 -13
classes/background-processes/class-post-conversion-process.php
CHANGED
@@ -59,16 +59,15 @@ class Post_Conversion_Process extends Conversion_Process {
|
|
59 |
$post_name = urldecode( $post->post_name );
|
60 |
|
61 |
add_filter( 'locale', [ $this, 'filter_post_locale' ] );
|
62 |
-
$
|
63 |
remove_filter( 'locale', [ $this, 'filter_post_locale' ] );
|
64 |
|
65 |
-
if (
|
66 |
update_post_meta( $post->ID, '_wp_old_slug', $post_name );
|
67 |
-
// phpcs:
|
68 |
-
$wpdb->update( $wpdb->posts, [ 'post_name' => $
|
69 |
-
// phpcs:enable
|
70 |
|
71 |
-
$this->log( __( 'Post slug converted:', 'cyr2lat' ) . ' ' . $post_name . ' => ' .
|
72 |
}
|
73 |
|
74 |
return false;
|
59 |
$post_name = urldecode( $post->post_name );
|
60 |
|
61 |
add_filter( 'locale', [ $this, 'filter_post_locale' ] );
|
62 |
+
$transliterated_name = $this->main->transliterate( $post_name );
|
63 |
remove_filter( 'locale', [ $this, 'filter_post_locale' ] );
|
64 |
|
65 |
+
if ( $transliterated_name !== $post_name ) {
|
66 |
update_post_meta( $post->ID, '_wp_old_slug', $post_name );
|
67 |
+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
68 |
+
$wpdb->update( $wpdb->posts, [ 'post_name' => rawurlencode( $transliterated_name ) ], [ 'ID' => $post->ID ] );
|
|
|
69 |
|
70 |
+
$this->log( __( 'Post slug converted:', 'cyr2lat' ) . ' ' . $post_name . ' => ' . $transliterated_name );
|
71 |
}
|
72 |
|
73 |
return false;
|
classes/background-processes/class-term-conversion-process.php
CHANGED
@@ -59,15 +59,14 @@ class Term_Conversion_Process extends Conversion_Process {
|
|
59 |
$slug = urldecode( $term->slug );
|
60 |
|
61 |
add_filter( 'locale', [ $this, 'filter_term_locale' ] );
|
62 |
-
$
|
63 |
remove_filter( 'locale', [ $this, 'filter_term_locale' ] );
|
64 |
|
65 |
-
if (
|
66 |
-
// phpcs:
|
67 |
-
$wpdb->update( $wpdb->terms, [ 'slug' => $
|
68 |
-
// phpcs:enable
|
69 |
|
70 |
-
$this->log( __( 'Term slug converted:', 'cyr2lat' ) . ' ' . $slug . ' => ' .
|
71 |
}
|
72 |
|
73 |
return false;
|
59 |
$slug = urldecode( $term->slug );
|
60 |
|
61 |
add_filter( 'locale', [ $this, 'filter_term_locale' ] );
|
62 |
+
$transliterated_slug = $this->main->transliterate( $slug );
|
63 |
remove_filter( 'locale', [ $this, 'filter_term_locale' ] );
|
64 |
|
65 |
+
if ( $transliterated_slug !== $slug ) {
|
66 |
+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
67 |
+
$wpdb->update( $wpdb->terms, [ 'slug' => rawurlencode( $transliterated_slug ) ], [ 'term_id' => $term->term_id ] );
|
|
|
68 |
|
69 |
+
$this->log( __( 'Term slug converted:', 'cyr2lat' ) . ' ' . $slug . ' => ' . $transliterated_slug );
|
70 |
}
|
71 |
|
72 |
return false;
|
classes/class-conversion-tables.php
CHANGED
@@ -26,320 +26,500 @@ class Conversion_Tables {
|
|
26 |
* @return array
|
27 |
*/
|
28 |
public static function get( $locale = '' ) {
|
29 |
-
$table = [
|
30 |
-
'А' => 'A',
|
31 |
-
'Б' => 'B',
|
32 |
-
'В' => 'V',
|
33 |
-
'Г' => 'G',
|
34 |
-
'Д' => 'D',
|
35 |
-
'Е' => 'E',
|
36 |
-
'Ё' => 'YO',
|
37 |
-
'Ж' => 'ZH',
|
38 |
-
'З' => 'Z',
|
39 |
-
'И' => 'I',
|
40 |
-
'Й' => 'J',
|
41 |
-
'І' => 'I',
|
42 |
-
'К' => 'K',
|
43 |
-
'Л' => 'L',
|
44 |
-
'М' => 'M',
|
45 |
-
'Н' => 'N',
|
46 |
-
'О' => 'O',
|
47 |
-
'П' => 'P',
|
48 |
-
'Р' => 'R',
|
49 |
-
'С' => 'S',
|
50 |
-
'Т' => 'T',
|
51 |
-
'У' => 'U',
|
52 |
-
'Ф' => 'F',
|
53 |
-
'Х' => 'H',
|
54 |
-
'Ц' => 'CZ',
|
55 |
-
'Ч' => 'CH',
|
56 |
-
'Ш' => 'SH',
|
57 |
-
'Щ' => 'SHH',
|
58 |
-
'Ъ' => '',
|
59 |
-
'Ы' => 'Y',
|
60 |
-
'Ь' => '',
|
61 |
-
'Э' => 'E',
|
62 |
-
'Ю' => 'YU',
|
63 |
-
'Я' => 'YA',
|
64 |
-
'Ѣ' => 'YE',
|
65 |
-
'Ѳ' => 'FH',
|
66 |
-
'Ѵ' => 'YH',
|
67 |
-
'а' => 'a',
|
68 |
-
'б' => 'b',
|
69 |
-
'в' => 'v',
|
70 |
-
'г' => 'g',
|
71 |
-
'д' => 'd',
|
72 |
-
'е' => 'e',
|
73 |
-
'ё' => 'yo',
|
74 |
-
'ж' => 'zh',
|
75 |
-
'з' => 'z',
|
76 |
-
'и' => 'i',
|
77 |
-
'й' => 'j',
|
78 |
-
'і' => 'i',
|
79 |
-
'к' => 'k',
|
80 |
-
'л' => 'l',
|
81 |
-
'м' => 'm',
|
82 |
-
'н' => 'n',
|
83 |
-
'о' => 'o',
|
84 |
-
'п' => 'p',
|
85 |
-
'р' => 'r',
|
86 |
-
'с' => 's',
|
87 |
-
'т' => 't',
|
88 |
-
'у' => 'u',
|
89 |
-
'ф' => 'f',
|
90 |
-
'х' => 'h',
|
91 |
-
'ц' => 'cz',
|
92 |
-
'ч' => 'ch',
|
93 |
-
'ш' => 'sh',
|
94 |
-
'щ' => 'shh',
|
95 |
-
'ъ' => '',
|
96 |
-
'ы' => 'y',
|
97 |
-
'ь' => '',
|
98 |
-
'э' => 'e',
|
99 |
-
'ю' => 'yu',
|
100 |
-
'я' => 'ya',
|
101 |
-
'ѣ' => 'ye',
|
102 |
-
'ѳ' => 'fh',
|
103 |
-
'ѵ' => 'yh',
|
104 |
-
];
|
105 |
switch ( $locale ) {
|
106 |
// Belorussian.
|
107 |
case 'bel':
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
break;
|
123 |
// Ukrainian.
|
124 |
case 'uk':
|
125 |
-
$table
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
break;
|
148 |
// Bulgarian.
|
149 |
case 'bg_BG':
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
break;
|
163 |
// Macedonian.
|
164 |
case 'mk_MK':
|
165 |
-
$table
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
break;
|
206 |
// Serbian.
|
207 |
case 'sr_RS':
|
208 |
-
$table
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
break;
|
255 |
// Georgian.
|
256 |
case 'ka_GE':
|
257 |
-
$table
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
break;
|
291 |
// Kazakh.
|
292 |
case 'kk':
|
293 |
-
$table
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
343 |
break;
|
344 |
// Hebrew.
|
345 |
case 'he_IL':
|
@@ -792,7 +972,84 @@ class Conversion_Tables {
|
|
792 |
'Zun' => '尊遵撙樽鳟',
|
793 |
'Zuo' => '昨左佐做作坐座阼唑嘬怍胙祚酢',
|
794 |
];
|
|
|
795 |
default:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
796 |
}
|
797 |
|
798 |
return $table;
|
26 |
* @return array
|
27 |
*/
|
28 |
public static function get( $locale = '' ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
switch ( $locale ) {
|
30 |
// Belorussian.
|
31 |
case 'bel':
|
32 |
+
$table = [
|
33 |
+
'А' => 'A',
|
34 |
+
'Б' => 'B',
|
35 |
+
'В' => 'V',
|
36 |
+
'Г' => 'G',
|
37 |
+
'Д' => 'D',
|
38 |
+
'Е' => 'E',
|
39 |
+
'Ё' => 'YO',
|
40 |
+
'Ж' => 'ZH',
|
41 |
+
'З' => 'Z',
|
42 |
+
'І' => 'I',
|
43 |
+
'Й' => 'J',
|
44 |
+
'К' => 'K',
|
45 |
+
'Л' => 'L',
|
46 |
+
'М' => 'M',
|
47 |
+
'Н' => 'N',
|
48 |
+
'О' => 'O',
|
49 |
+
'П' => 'P',
|
50 |
+
'Р' => 'R',
|
51 |
+
'С' => 'S',
|
52 |
+
'Т' => 'T',
|
53 |
+
'У' => 'U',
|
54 |
+
'Ў' => 'U',
|
55 |
+
'Ф' => 'F',
|
56 |
+
'Х' => 'H',
|
57 |
+
'Ц' => 'CZ',
|
58 |
+
'Ч' => 'CH',
|
59 |
+
'Ш' => 'SH',
|
60 |
+
'Ы' => 'Y',
|
61 |
+
'Ь' => '',
|
62 |
+
'Э' => 'E',
|
63 |
+
'Ю' => 'YU',
|
64 |
+
'Я' => 'YA',
|
65 |
+
'а' => 'a',
|
66 |
+
'б' => 'b',
|
67 |
+
'в' => 'v',
|
68 |
+
'г' => 'g',
|
69 |
+
'д' => 'd',
|
70 |
+
'е' => 'e',
|
71 |
+
'ё' => 'yo',
|
72 |
+
'ж' => 'zh',
|
73 |
+
'з' => 'z',
|
74 |
+
'і' => 'i',
|
75 |
+
'й' => 'j',
|
76 |
+
'к' => 'k',
|
77 |
+
'л' => 'l',
|
78 |
+
'м' => 'm',
|
79 |
+
'н' => 'n',
|
80 |
+
'о' => 'o',
|
81 |
+
'п' => 'p',
|
82 |
+
'р' => 'r',
|
83 |
+
'с' => 's',
|
84 |
+
'т' => 't',
|
85 |
+
'у' => 'u',
|
86 |
+
'ў' => 'u',
|
87 |
+
'ф' => 'f',
|
88 |
+
'х' => 'h',
|
89 |
+
'ц' => 'cz',
|
90 |
+
'ч' => 'ch',
|
91 |
+
'ш' => 'sh',
|
92 |
+
'ы' => 'y',
|
93 |
+
'ь' => '',
|
94 |
+
'э' => 'e',
|
95 |
+
'ю' => 'yu',
|
96 |
+
'я' => 'ya',
|
97 |
+
];
|
98 |
break;
|
99 |
// Ukrainian.
|
100 |
case 'uk':
|
101 |
+
$table = [
|
102 |
+
'А' => 'A',
|
103 |
+
'Б' => 'B',
|
104 |
+
'В' => 'V',
|
105 |
+
'Г' => 'G',
|
106 |
+
'Ґ' => 'G',
|
107 |
+
'Д' => 'D',
|
108 |
+
'Е' => 'E',
|
109 |
+
'Є' => 'YE',
|
110 |
+
'Ж' => 'ZH',
|
111 |
+
'З' => 'Z',
|
112 |
+
'И' => 'Y',
|
113 |
+
'І' => 'I',
|
114 |
+
'Ї' => 'YI',
|
115 |
+
'Й' => 'J',
|
116 |
+
'К' => 'K',
|
117 |
+
'Л' => 'L',
|
118 |
+
'М' => 'M',
|
119 |
+
'Н' => 'N',
|
120 |
+
'О' => 'O',
|
121 |
+
'П' => 'P',
|
122 |
+
'Р' => 'R',
|
123 |
+
'С' => 'S',
|
124 |
+
'Т' => 'T',
|
125 |
+
'У' => 'U',
|
126 |
+
'Ф' => 'F',
|
127 |
+
'Х' => 'H',
|
128 |
+
'Ц' => 'CZ',
|
129 |
+
'Ч' => 'CH',
|
130 |
+
'Ш' => 'SH',
|
131 |
+
'Щ' => 'SHH',
|
132 |
+
'Ь' => '',
|
133 |
+
'Ю' => 'YU',
|
134 |
+
'Я' => 'YA',
|
135 |
+
'а' => 'a',
|
136 |
+
'б' => 'b',
|
137 |
+
'в' => 'v',
|
138 |
+
'г' => 'g',
|
139 |
+
'ґ' => 'g',
|
140 |
+
'д' => 'd',
|
141 |
+
'е' => 'e',
|
142 |
+
'є' => 'ye',
|
143 |
+
'ж' => 'zh',
|
144 |
+
'з' => 'z',
|
145 |
+
'и' => 'y',
|
146 |
+
'і' => 'i',
|
147 |
+
'ї' => 'yi',
|
148 |
+
'й' => 'j',
|
149 |
+
'к' => 'k',
|
150 |
+
'л' => 'l',
|
151 |
+
'м' => 'm',
|
152 |
+
'н' => 'n',
|
153 |
+
'о' => 'o',
|
154 |
+
'п' => 'p',
|
155 |
+
'р' => 'r',
|
156 |
+
'с' => 's',
|
157 |
+
'т' => 't',
|
158 |
+
'у' => 'u',
|
159 |
+
'ф' => 'f',
|
160 |
+
'х' => 'h',
|
161 |
+
'ц' => 'cz',
|
162 |
+
'ч' => 'ch',
|
163 |
+
'ш' => 'sh',
|
164 |
+
'щ' => 'shh',
|
165 |
+
'ь' => '',
|
166 |
+
'ю' => 'yu',
|
167 |
+
'я' => 'ya',
|
168 |
+
];
|
169 |
break;
|
170 |
// Bulgarian.
|
171 |
case 'bg_BG':
|
172 |
+
$table = [
|
173 |
+
'А' => 'A',
|
174 |
+
'Б' => 'B',
|
175 |
+
'В' => 'V',
|
176 |
+
'Г' => 'G',
|
177 |
+
'Д' => 'D',
|
178 |
+
'Е' => 'E',
|
179 |
+
'Ж' => 'ZH',
|
180 |
+
'З' => 'Z',
|
181 |
+
'И' => 'I',
|
182 |
+
'Й' => 'J',
|
183 |
+
'К' => 'K',
|
184 |
+
'Л' => 'L',
|
185 |
+
'М' => 'M',
|
186 |
+
'Н' => 'N',
|
187 |
+
'О' => 'O',
|
188 |
+
'П' => 'P',
|
189 |
+
'Р' => 'R',
|
190 |
+
'С' => 'S',
|
191 |
+
'Т' => 'T',
|
192 |
+
'У' => 'U',
|
193 |
+
'Ф' => 'F',
|
194 |
+
'Х' => 'H',
|
195 |
+
'Ц' => 'CZ',
|
196 |
+
'Ч' => 'CH',
|
197 |
+
'Ш' => 'SH',
|
198 |
+
'Щ' => 'STH',
|
199 |
+
'Ъ' => 'A',
|
200 |
+
'Ь' => '',
|
201 |
+
'Ю' => 'YU',
|
202 |
+
'Я' => 'YA',
|
203 |
+
'а' => 'a',
|
204 |
+
'б' => 'b',
|
205 |
+
'в' => 'v',
|
206 |
+
'г' => 'g',
|
207 |
+
'д' => 'd',
|
208 |
+
'е' => 'e',
|
209 |
+
'ж' => 'zh',
|
210 |
+
'з' => 'z',
|
211 |
+
'и' => 'i',
|
212 |
+
'й' => 'j',
|
213 |
+
'к' => 'k',
|
214 |
+
'л' => 'l',
|
215 |
+
'м' => 'm',
|
216 |
+
'н' => 'n',
|
217 |
+
'о' => 'o',
|
218 |
+
'п' => 'p',
|
219 |
+
'р' => 'r',
|
220 |
+
'с' => 's',
|
221 |
+
'т' => 't',
|
222 |
+
'у' => 'u',
|
223 |
+
'ф' => 'f',
|
224 |
+
'х' => 'h',
|
225 |
+
'ц' => 'cz',
|
226 |
+
'ч' => 'ch',
|
227 |
+
'ш' => 'sh',
|
228 |
+
'щ' => 'sth',
|
229 |
+
'ъ' => 'a',
|
230 |
+
'ь' => '',
|
231 |
+
'ю' => 'yu',
|
232 |
+
'я' => 'ya',
|
233 |
+
'І' => 'I',
|
234 |
+
'і' => 'i',
|
235 |
+
'Ѣ' => 'YE',
|
236 |
+
'ѣ' => 'ye',
|
237 |
+
'Ѫ' => 'О',
|
238 |
+
'ѫ' => 'о',
|
239 |
+
'Ѳ' => 'FH',
|
240 |
+
'ѳ' => 'fh',
|
241 |
+
'Ѵ' => 'YH',
|
242 |
+
'ѵ' => 'yh',
|
243 |
+
];
|
244 |
break;
|
245 |
// Macedonian.
|
246 |
case 'mk_MK':
|
247 |
+
$table = [
|
248 |
+
'А' => 'A',
|
249 |
+
'Б' => 'B',
|
250 |
+
'В' => 'V',
|
251 |
+
'Г' => 'G',
|
252 |
+
'Д' => 'D',
|
253 |
+
'Ѓ' => 'G',
|
254 |
+
'Е' => 'E',
|
255 |
+
'Ж' => 'ZH',
|
256 |
+
'З' => 'Z',
|
257 |
+
'И' => 'I',
|
258 |
+
'Ѕ' => 'Z',
|
259 |
+
'Ј' => 'J',
|
260 |
+
'К' => 'K',
|
261 |
+
'Л' => 'L',
|
262 |
+
'Љ' => 'L',
|
263 |
+
'М' => 'M',
|
264 |
+
'Н' => 'N',
|
265 |
+
'Њ' => 'N',
|
266 |
+
'О' => 'O',
|
267 |
+
'П' => 'P',
|
268 |
+
'Р' => 'R',
|
269 |
+
'С' => 'S',
|
270 |
+
'Т' => 'T',
|
271 |
+
'Ќ' => 'K',
|
272 |
+
'У' => 'U',
|
273 |
+
'Ф' => 'F',
|
274 |
+
'Х' => 'H',
|
275 |
+
'Ц' => 'CZ',
|
276 |
+
'Ч' => 'CH',
|
277 |
+
'Џ' => 'DH',
|
278 |
+
'Ш' => 'SH',
|
279 |
+
'а' => 'a',
|
280 |
+
'б' => 'b',
|
281 |
+
'в' => 'v',
|
282 |
+
'г' => 'g',
|
283 |
+
'д' => 'd',
|
284 |
+
'ѓ' => 'g',
|
285 |
+
'е' => 'e',
|
286 |
+
'ж' => 'zh',
|
287 |
+
'з' => 'z',
|
288 |
+
'и' => 'i',
|
289 |
+
'ѕ' => 'z',
|
290 |
+
'ј' => 'j',
|
291 |
+
'к' => 'k',
|
292 |
+
'л' => 'l',
|
293 |
+
'љ' => 'l',
|
294 |
+
'м' => 'm',
|
295 |
+
'н' => 'n',
|
296 |
+
'њ' => 'n',
|
297 |
+
'о' => 'o',
|
298 |
+
'п' => 'p',
|
299 |
+
'р' => 'r',
|
300 |
+
'с' => 's',
|
301 |
+
'т' => 't',
|
302 |
+
'ќ' => 'k',
|
303 |
+
'у' => 'u',
|
304 |
+
'ф' => 'f',
|
305 |
+
'х' => 'h',
|
306 |
+
'ц' => 'cz',
|
307 |
+
'ч' => 'ch',
|
308 |
+
'џ' => 'dh',
|
309 |
+
'ш' => 'sh',
|
310 |
+
];
|
311 |
break;
|
312 |
// Serbian.
|
313 |
case 'sr_RS':
|
314 |
+
$table = [
|
315 |
+
'А' => 'A',
|
316 |
+
'Б' => 'B',
|
317 |
+
'В' => 'V',
|
318 |
+
'Г' => 'G',
|
319 |
+
'Д' => 'D',
|
320 |
+
'Ђ' => 'Dj',
|
321 |
+
'Е' => 'E',
|
322 |
+
'Ж' => 'Z',
|
323 |
+
'З' => 'Z',
|
324 |
+
'И' => 'I',
|
325 |
+
'J' => 'J',
|
326 |
+
'К' => 'K',
|
327 |
+
'Л' => 'L',
|
328 |
+
'Љ' => 'Lj',
|
329 |
+
'М' => 'M',
|
330 |
+
'Н' => 'N',
|
331 |
+
'Њ' => 'Nj',
|
332 |
+
'О' => 'O',
|
333 |
+
'П' => 'P',
|
334 |
+
'Р' => 'R',
|
335 |
+
'С' => 'S',
|
336 |
+
'Т' => 'T',
|
337 |
+
'Ћ' => 'C',
|
338 |
+
'У' => 'U',
|
339 |
+
'Ф' => 'F',
|
340 |
+
'Х' => 'H',
|
341 |
+
'Ц' => 'C',
|
342 |
+
'Ч' => 'C',
|
343 |
+
'Џ' => 'Dz',
|
344 |
+
'Ш' => 'S',
|
345 |
+
'а' => 'a',
|
346 |
+
'б' => 'b',
|
347 |
+
'в' => 'v',
|
348 |
+
'г' => 'g',
|
349 |
+
'д' => 'd',
|
350 |
+
'ђ' => 'dj',
|
351 |
+
'е' => 'e',
|
352 |
+
'ж' => 'z',
|
353 |
+
'з' => 'z',
|
354 |
+
'и' => 'i',
|
355 |
+
'j' => 'j',
|
356 |
+
'к' => 'k',
|
357 |
+
'л' => 'l',
|
358 |
+
'љ' => 'lj',
|
359 |
+
'м' => 'm',
|
360 |
+
'н' => 'n',
|
361 |
+
'њ' => 'nj',
|
362 |
+
'о' => 'o',
|
363 |
+
'п' => 'p',
|
364 |
+
'р' => 'r',
|
365 |
+
'с' => 's',
|
366 |
+
'т' => 't',
|
367 |
+
'ћ' => 'c',
|
368 |
+
'у' => 'u',
|
369 |
+
'ф' => 'f',
|
370 |
+
'х' => 'h',
|
371 |
+
'ц' => 'c',
|
372 |
+
'ч' => 'c',
|
373 |
+
'џ' => 'dz',
|
374 |
+
'ш' => 's',
|
375 |
+
];
|
376 |
break;
|
377 |
// Georgian.
|
378 |
case 'ka_GE':
|
379 |
+
$table = [
|
380 |
+
'ა' => 'a',
|
381 |
+
'ბ' => 'b',
|
382 |
+
'გ' => 'g',
|
383 |
+
'დ' => 'd',
|
384 |
+
'ე' => 'e',
|
385 |
+
'ვ' => 'v',
|
386 |
+
'ზ' => 'z',
|
387 |
+
'ჱ' => '',
|
388 |
+
'თ' => 'th',
|
389 |
+
'ი' => 'i',
|
390 |
+
'კ' => 'k',
|
391 |
+
'ლ' => 'l',
|
392 |
+
'მ' => 'm',
|
393 |
+
'ნ' => 'n',
|
394 |
+
'ჲ' => '',
|
395 |
+
'ო' => 'o',
|
396 |
+
'პ' => 'p',
|
397 |
+
'ჟ' => 'zh',
|
398 |
+
'რ' => 'r',
|
399 |
+
'ს' => 's',
|
400 |
+
'ტ' => 't',
|
401 |
+
'ჳ' => '',
|
402 |
+
'უ' => 'u',
|
403 |
+
'ფ' => 'ph',
|
404 |
+
'ქ' => 'kh',
|
405 |
+
'ღ' => 'gh',
|
406 |
+
'ყ' => 'qh',
|
407 |
+
'შ' => 'sh',
|
408 |
+
'ჩ' => 'ch',
|
409 |
+
'ც' => 'ts',
|
410 |
+
'ძ' => 'dz',
|
411 |
+
'წ' => 'c',
|
412 |
+
'ჭ' => 'ch',
|
413 |
+
'ხ' => 'kh',
|
414 |
+
'ჴ' => '',
|
415 |
+
'ჯ' => 'j',
|
416 |
+
'ჰ' => 'h',
|
417 |
+
'ჵ' => '',
|
418 |
+
];
|
419 |
break;
|
420 |
// Kazakh.
|
421 |
case 'kk':
|
422 |
+
$table = [
|
423 |
+
'А' => 'A',
|
424 |
+
'Ә' => 'Ae',
|
425 |
+
'Б' => 'B',
|
426 |
+
'В' => 'V',
|
427 |
+
'Г' => 'G',
|
428 |
+
'Ғ' => 'Gh',
|
429 |
+
'Д' => 'D',
|
430 |
+
'Е' => 'E',
|
431 |
+
'Ё' => 'YO',
|
432 |
+
'Ж' => 'ZH',
|
433 |
+
'З' => 'Z',
|
434 |
+
'И' => 'I',
|
435 |
+
'Й' => 'J',
|
436 |
+
'К' => 'K',
|
437 |
+
'Қ' => 'Q',
|
438 |
+
'Л' => 'L',
|
439 |
+
'М' => 'M',
|
440 |
+
'Н' => 'N',
|
441 |
+
'Ң' => 'Ng',
|
442 |
+
'О' => 'O',
|
443 |
+
'Ө' => 'Oe',
|
444 |
+
'П' => 'P',
|
445 |
+
'Р' => 'R',
|
446 |
+
'С' => 'S',
|
447 |
+
'Т' => 'T',
|
448 |
+
'У' => 'W',
|
449 |
+
'Ұ' => 'U',
|
450 |
+
'Ү' => 'Ue',
|
451 |
+
'Ф' => 'F',
|
452 |
+
'Х' => 'H',
|
453 |
+
'Һ' => 'H',
|
454 |
+
'Ц' => 'C',
|
455 |
+
'Ч' => 'CH',
|
456 |
+
'Ш' => 'SH',
|
457 |
+
'Щ' => 'SHH',
|
458 |
+
'Ъ' => '',
|
459 |
+
'Ы' => 'Y',
|
460 |
+
'І' => 'I',
|
461 |
+
'Ь' => '',
|
462 |
+
'Э' => 'E',
|
463 |
+
'Ю' => 'YU',
|
464 |
+
'Я' => 'YA',
|
465 |
+
'а' => 'a',
|
466 |
+
'ә' => 'ae',
|
467 |
+
'б' => 'b',
|
468 |
+
'в' => 'v',
|
469 |
+
'г' => 'g',
|
470 |
+
'ғ' => 'gh',
|
471 |
+
'д' => 'd',
|
472 |
+
'е' => 'e',
|
473 |
+
'ё' => 'yo',
|
474 |
+
'ж' => 'zh',
|
475 |
+
'з' => 'z',
|
476 |
+
'и' => 'i',
|
477 |
+
'й' => 'j',
|
478 |
+
'к' => 'k',
|
479 |
+
'қ' => 'q',
|
480 |
+
'л' => 'l',
|
481 |
+
'м' => 'm',
|
482 |
+
'н' => 'n',
|
483 |
+
'ң' => 'ng',
|
484 |
+
'о' => 'o',
|
485 |
+
'ө' => 'oe',
|
486 |
+
'п' => 'p',
|
487 |
+
'р' => 'r',
|
488 |
+
'с' => 's',
|
489 |
+
'т' => 't',
|
490 |
+
'у' => 'w',
|
491 |
+
'ұ' => 'u',
|
492 |
+
'ү' => 'ue',
|
493 |
+
'ф' => 'f',
|
494 |
+
'х' => 'h',
|
495 |
+
'һ' => 'h',
|
496 |
+
'ц' => 'c',
|
497 |
+
'ч' => 'ch',
|
498 |
+
'ш' => 'sh',
|
499 |
+
'щ' => 'shh',
|
500 |
+
'ъ' => '',
|
501 |
+
'ы' => 'y',
|
502 |
+
'і' => 'i',
|
503 |
+
'ь' => '',
|
504 |
+
'э' => 'e',
|
505 |
+
'ю' => 'yu',
|
506 |
+
'я' => 'ya',
|
507 |
+
// Kazakh 2018 latin.
|
508 |
+
'Á' => 'A',
|
509 |
+
'Ǵ' => 'G',
|
510 |
+
'I' => 'I',
|
511 |
+
'Ń' => 'N',
|
512 |
+
'Ó' => 'O',
|
513 |
+
'Ú' => 'O',
|
514 |
+
'Ý' => 'O',
|
515 |
+
'á' => 'a',
|
516 |
+
'ǵ' => 'g',
|
517 |
+
'ı' => 'i',
|
518 |
+
'ń' => 'n',
|
519 |
+
'ó' => 'o',
|
520 |
+
'ú' => 'o',
|
521 |
+
'ý' => 'o',
|
522 |
+
];
|
523 |
break;
|
524 |
// Hebrew.
|
525 |
case 'he_IL':
|
972 |
'Zun' => '尊遵撙樽鳟',
|
973 |
'Zuo' => '昨左佐做作坐座阼唑嘬怍胙祚酢',
|
974 |
];
|
975 |
+
break;
|
976 |
default:
|
977 |
+
$table = [
|
978 |
+
'А' => 'A',
|
979 |
+
'Б' => 'B',
|
980 |
+
'В' => 'V',
|
981 |
+
'Г' => 'G',
|
982 |
+
'Д' => 'D',
|
983 |
+
'Е' => 'E',
|
984 |
+
'Ё' => 'YO',
|
985 |
+
'Ж' => 'ZH',
|
986 |
+
'З' => 'Z',
|
987 |
+
'И' => 'I',
|
988 |
+
'Й' => 'J',
|
989 |
+
'К' => 'K',
|
990 |
+
'Л' => 'L',
|
991 |
+
'М' => 'M',
|
992 |
+
'Н' => 'N',
|
993 |
+
'О' => 'O',
|
994 |
+
'П' => 'P',
|
995 |
+
'Р' => 'R',
|
996 |
+
'С' => 'S',
|
997 |
+
'Т' => 'T',
|
998 |
+
'У' => 'U',
|
999 |
+
'Ф' => 'F',
|
1000 |
+
'Х' => 'H',
|
1001 |
+
'Ц' => 'CZ',
|
1002 |
+
'Ч' => 'CH',
|
1003 |
+
'Ш' => 'SH',
|
1004 |
+
'Щ' => 'SHH',
|
1005 |
+
'Ъ' => '',
|
1006 |
+
'Ы' => 'Y',
|
1007 |
+
'Ь' => '',
|
1008 |
+
'Э' => 'E',
|
1009 |
+
'Ю' => 'YU',
|
1010 |
+
'Я' => 'YA',
|
1011 |
+
'а' => 'a',
|
1012 |
+
'б' => 'b',
|
1013 |
+
'в' => 'v',
|
1014 |
+
'г' => 'g',
|
1015 |
+
'д' => 'd',
|
1016 |
+
'е' => 'e',
|
1017 |
+
'ё' => 'yo',
|
1018 |
+
'ж' => 'zh',
|
1019 |
+
'з' => 'z',
|
1020 |
+
'и' => 'i',
|
1021 |
+
'й' => 'j',
|
1022 |
+
'к' => 'k',
|
1023 |
+
'л' => 'l',
|
1024 |
+
'м' => 'm',
|
1025 |
+
'н' => 'n',
|
1026 |
+
'о' => 'o',
|
1027 |
+
'п' => 'p',
|
1028 |
+
'р' => 'r',
|
1029 |
+
'с' => 's',
|
1030 |
+
'т' => 't',
|
1031 |
+
'у' => 'u',
|
1032 |
+
'ф' => 'f',
|
1033 |
+
'х' => 'h',
|
1034 |
+
'ц' => 'cz',
|
1035 |
+
'ч' => 'ch',
|
1036 |
+
'ш' => 'sh',
|
1037 |
+
'щ' => 'shh',
|
1038 |
+
'ъ' => '',
|
1039 |
+
'ы' => 'y',
|
1040 |
+
'ь' => '',
|
1041 |
+
'э' => 'e',
|
1042 |
+
'ю' => 'yu',
|
1043 |
+
'я' => 'ya',
|
1044 |
+
'І' => 'I',
|
1045 |
+
'і' => 'i',
|
1046 |
+
'Ѣ' => 'YE',
|
1047 |
+
'ѣ' => 'ye',
|
1048 |
+
'Ѳ' => 'FH',
|
1049 |
+
'ѳ' => 'fh',
|
1050 |
+
'Ѵ' => 'YH',
|
1051 |
+
'ѵ' => 'yh',
|
1052 |
+
];
|
1053 |
}
|
1054 |
|
1055 |
return $table;
|
classes/class-main.php
CHANGED
@@ -110,61 +110,53 @@ class Main {
|
|
110 |
* Init class hooks.
|
111 |
*/
|
112 |
public function init_hooks() {
|
113 |
-
add_filter( '
|
|
|
|
|
|
|
114 |
add_filter( 'sanitize_file_name', [ $this, 'ctl_sanitize_filename' ], 10, 2 );
|
115 |
add_filter( 'wp_insert_post_data', [ $this, 'ctl_sanitize_post_name' ], 10, 2 );
|
116 |
}
|
117 |
|
118 |
/**
|
119 |
-
*
|
120 |
*
|
121 |
-
* @param string $
|
122 |
-
* @param
|
123 |
-
* @param string $
|
|
|
|
|
|
|
124 |
*
|
125 |
* @return string
|
126 |
*/
|
127 |
-
public function
|
128 |
-
|
129 |
-
|
130 |
-
if ( ! $title ) {
|
131 |
-
return $title;
|
132 |
-
}
|
133 |
-
|
134 |
-
// Fixed bug with `_wp_old_slug` redirect.
|
135 |
-
if ( 'query' === $context ) {
|
136 |
-
return $title;
|
137 |
-
}
|
138 |
-
|
139 |
-
$title = urldecode( $title );
|
140 |
-
$pre = apply_filters( 'ctl_pre_sanitize_title', false, $title );
|
141 |
-
|
142 |
-
if ( false !== $pre ) {
|
143 |
-
return $pre;
|
144 |
-
}
|
145 |
-
|
146 |
-
$is_term = false;
|
147 |
-
// phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
|
148 |
-
$backtrace = debug_backtrace( ~DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS );
|
149 |
-
// phpcs:enable
|
150 |
-
foreach ( $backtrace as $backtrace_entry ) {
|
151 |
-
if ( 'wp_insert_term' === $backtrace_entry['function'] ) {
|
152 |
-
$is_term = true;
|
153 |
-
break;
|
154 |
-
}
|
155 |
-
}
|
156 |
-
|
157 |
-
// phpcs:disable WordPress.DB.DirectDatabaseQuery
|
158 |
-
$term = $is_term ? $wpdb->get_var( $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE name = %s", $title ) ) : '';
|
159 |
-
// phpcs:enable
|
160 |
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
|
167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
}
|
169 |
|
170 |
/**
|
@@ -183,7 +175,7 @@ class Main {
|
|
183 |
}
|
184 |
|
185 |
if ( seems_utf8( $filename ) ) {
|
186 |
-
$filename =
|
187 |
}
|
188 |
|
189 |
return $this->transliterate( $filename );
|
@@ -219,7 +211,7 @@ class Main {
|
|
219 |
* @return string
|
220 |
*/
|
221 |
protected function split_chinese_string( $string, $table ) {
|
222 |
-
if ( ! $this->settings->is_chinese_locale() ||
|
223 |
return $string;
|
224 |
}
|
225 |
|
@@ -237,6 +229,17 @@ class Main {
|
|
237 |
return $string;
|
238 |
}
|
239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
/**
|
241 |
* Get transliteration table.
|
242 |
*
|
@@ -253,7 +256,7 @@ class Main {
|
|
253 |
*
|
254 |
* @return string
|
255 |
*/
|
256 |
-
|
257 |
$table = $this->get_filtered_table();
|
258 |
|
259 |
$string = $this->fix_mac_string( $string );
|
@@ -329,17 +332,10 @@ class Main {
|
|
329 |
* @return mixed
|
330 |
*/
|
331 |
public function ctl_sanitize_post_name( $data, $postarr = [] ) {
|
332 |
-
global $current_screen;
|
333 |
-
|
334 |
if ( ! $this->ctl_is_gutenberg_editor_active() ) {
|
335 |
return $data;
|
336 |
}
|
337 |
|
338 |
-
// Run code only on post edit screen.
|
339 |
-
if ( ! ( $current_screen && 'post' === $current_screen->base ) ) {
|
340 |
-
return $data;
|
341 |
-
}
|
342 |
-
|
343 |
if (
|
344 |
! $data['post_name'] && $data['post_title'] &&
|
345 |
! in_array( $data['post_status'], [ 'auto-draft', 'revision' ], true )
|
110 |
* Init class hooks.
|
111 |
*/
|
112 |
public function init_hooks() {
|
113 |
+
add_filter( 'wp_unique_post_slug', [ $this, 'wp_unique_post_slug_filter' ], 10, 6 );
|
114 |
+
add_filter( 'wp_unique_term_slug', [ $this, 'wp_unique_term_slug_filter' ], 10, 3 );
|
115 |
+
add_filter( 'pre_term_slug', [ $this, 'pre_term_slug_filter' ], 10, 2 );
|
116 |
+
|
117 |
add_filter( 'sanitize_file_name', [ $this, 'ctl_sanitize_filename' ], 10, 2 );
|
118 |
add_filter( 'wp_insert_post_data', [ $this, 'ctl_sanitize_post_name' ], 10, 2 );
|
119 |
}
|
120 |
|
121 |
/**
|
122 |
+
* Filter post slug.
|
123 |
*
|
124 |
+
* @param string $slug The post slug.
|
125 |
+
* @param int $post_ID Post ID.
|
126 |
+
* @param string $post_status The post status.
|
127 |
+
* @param string $post_type Post type.
|
128 |
+
* @param int $post_parent Post parent ID.
|
129 |
+
* @param string $original_slug The original post slug.
|
130 |
*
|
131 |
* @return string
|
132 |
*/
|
133 |
+
public function wp_unique_post_slug_filter( $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug ) {
|
134 |
+
return $this->transliterate_encoded( $slug );
|
135 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
|
137 |
+
/**
|
138 |
+
* Filter wp_unique_term_slug.
|
139 |
+
*
|
140 |
+
* @param string $slug Unique term slug.
|
141 |
+
* @param object $term Term object.
|
142 |
+
* @param string $original_slug Slug originally passed to the function for testing.
|
143 |
+
*
|
144 |
+
* @return string
|
145 |
+
*/
|
146 |
+
public function wp_unique_term_slug_filter( $slug, $term, $original_slug ) {
|
147 |
+
return $this->transliterate_encoded( $slug );
|
148 |
+
}
|
149 |
|
150 |
+
/**
|
151 |
+
* Filter pre_term_slug.
|
152 |
+
*
|
153 |
+
* @param mixed $value Value of the term field.
|
154 |
+
* @param string $taxonomy Taxonomy slug.
|
155 |
+
*
|
156 |
+
* @return string
|
157 |
+
*/
|
158 |
+
public function pre_term_slug_filter( $value, $taxonomy ) {
|
159 |
+
return $this->transliterate_encoded( $value );
|
160 |
}
|
161 |
|
162 |
/**
|
175 |
}
|
176 |
|
177 |
if ( seems_utf8( $filename ) ) {
|
178 |
+
$filename = mb_strtolower( $filename );
|
179 |
}
|
180 |
|
181 |
return $this->transliterate( $filename );
|
211 |
* @return string
|
212 |
*/
|
213 |
protected function split_chinese_string( $string, $table ) {
|
214 |
+
if ( ! $this->settings->is_chinese_locale() || mb_strlen( $string ) < 4 ) {
|
215 |
return $string;
|
216 |
}
|
217 |
|
229 |
return $string;
|
230 |
}
|
231 |
|
232 |
+
/**
|
233 |
+
* Transliterate encoded url.
|
234 |
+
*
|
235 |
+
* @param string $url Url.
|
236 |
+
*
|
237 |
+
* @return string
|
238 |
+
*/
|
239 |
+
private function transliterate_encoded( $url ) {
|
240 |
+
return rawurlencode( $this->transliterate( urldecode( $url ) ) );
|
241 |
+
}
|
242 |
+
|
243 |
/**
|
244 |
* Get transliteration table.
|
245 |
*
|
256 |
*
|
257 |
* @return string
|
258 |
*/
|
259 |
+
public function transliterate( $string ) {
|
260 |
$table = $this->get_filtered_table();
|
261 |
|
262 |
$string = $this->fix_mac_string( $string );
|
332 |
* @return mixed
|
333 |
*/
|
334 |
public function ctl_sanitize_post_name( $data, $postarr = [] ) {
|
|
|
|
|
335 |
if ( ! $this->ctl_is_gutenberg_editor_active() ) {
|
336 |
return $data;
|
337 |
}
|
338 |
|
|
|
|
|
|
|
|
|
|
|
339 |
if (
|
340 |
! $data['post_name'] && $data['post_title'] &&
|
341 |
! in_array( $data['post_status'], [ 'auto-draft', 'revision' ], true )
|
classes/class-requirements.php
CHANGED
@@ -43,8 +43,6 @@ if ( ! class_exists( __NAMESPACE__ . '\Requirements' ) ) {
|
|
43 |
*
|
44 |
* @param Admin_Notices $admin_notices Admin notices.
|
45 |
* @param WP_Filesystem_Direct $wp_filesystem File system.
|
46 |
-
*
|
47 |
-
* @throws RuntimeException RuntimeException.
|
48 |
*/
|
49 |
public function __construct( $admin_notices = null, $wp_filesystem = null ) {
|
50 |
$this->admin_notices = $admin_notices;
|
43 |
*
|
44 |
* @param Admin_Notices $admin_notices Admin notices.
|
45 |
* @param WP_Filesystem_Direct $wp_filesystem File system.
|
|
|
|
|
46 |
*/
|
47 |
public function __construct( $admin_notices = null, $wp_filesystem = null ) {
|
48 |
$this->admin_notices = $admin_notices;
|
cyr-to-lat.php
CHANGED
@@ -9,8 +9,8 @@
|
|
9 |
* Author URI: https://profiles.wordpress.org/sergeybiryukov/
|
10 |
* Requires at least: 5.1
|
11 |
* Tested up to: 5.3
|
12 |
-
* Version: 4.3.
|
13 |
-
* Stable tag: 4.3.
|
14 |
*
|
15 |
* Text Domain: cyr2lat
|
16 |
* Domain Path: /languages/
|
@@ -30,7 +30,7 @@ if ( ! defined( 'CYR_TO_LAT_VERSION' ) ) {
|
|
30 |
/**
|
31 |
* Plugin version.
|
32 |
*/
|
33 |
-
define( 'CYR_TO_LAT_VERSION', '4.3.
|
34 |
}
|
35 |
|
36 |
if ( ! defined( 'CYR_TO_LAT_PATH' ) ) {
|
9 |
* Author URI: https://profiles.wordpress.org/sergeybiryukov/
|
10 |
* Requires at least: 5.1
|
11 |
* Tested up to: 5.3
|
12 |
+
* Version: 4.3.3
|
13 |
+
* Stable tag: 4.3.3
|
14 |
*
|
15 |
* Text Domain: cyr2lat
|
16 |
* Domain Path: /languages/
|
30 |
/**
|
31 |
* Plugin version.
|
32 |
*/
|
33 |
+
define( 'CYR_TO_LAT_VERSION', '4.3.3' );
|
34 |
}
|
35 |
|
36 |
if ( ! defined( 'CYR_TO_LAT_PATH' ) ) {
|
lib/polyfill-mbstring/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Copyright (c) 2015-2019 Fabien Potencier
|
2 |
+
|
3 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
+
of this software and associated documentation files (the "Software"), to deal
|
5 |
+
in the Software without restriction, including without limitation the rights
|
6 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 |
+
copies of the Software, and to permit persons to whom the Software is furnished
|
8 |
+
to do so, subject to the following conditions:
|
9 |
+
|
10 |
+
The above copyright notice and this permission notice shall be included in all
|
11 |
+
copies or substantial portions of the Software.
|
12 |
+
|
13 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19 |
+
THE SOFTWARE.
|
lib/polyfill-mbstring/Mbstring.php
CHANGED
@@ -1,13 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
3 |
* This file is part of the Symfony package.
|
4 |
*
|
5 |
* (c) Fabien Potencier <fabien@symfony.com>
|
6 |
*
|
7 |
* For the full copyright and license information, please view the LICENSE
|
8 |
* file that was distributed with this source code.
|
9 |
-
*
|
10 |
-
* @package cyr-to-lat
|
11 |
*/
|
12 |
|
13 |
namespace Cyr_To_Lat\Symfony\Polyfill\Mbstring;
|
@@ -513,7 +512,9 @@ final class Mbstring
|
|
513 |
$offset = 0;
|
514 |
} elseif ($offset = (int) $offset) {
|
515 |
if ($offset < 0) {
|
516 |
-
|
|
|
|
|
517 |
$offset = 0;
|
518 |
} else {
|
519 |
$haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding);
|
@@ -533,7 +534,7 @@ final class Mbstring
|
|
533 |
return null;
|
534 |
}
|
535 |
|
536 |
-
if ($split_length
|
537 |
trigger_error('The length of each segment must be greater than zero', E_USER_WARNING);
|
538 |
|
539 |
return false;
|
@@ -543,6 +544,10 @@ final class Mbstring
|
|
543 |
$encoding = mb_internal_encoding();
|
544 |
}
|
545 |
|
|
|
|
|
|
|
|
|
546 |
$result = array();
|
547 |
$length = mb_strlen($string, $encoding);
|
548 |
|
@@ -816,11 +821,16 @@ final class Mbstring
|
|
816 |
return self::$internalEncoding;
|
817 |
}
|
818 |
|
|
|
|
|
|
|
|
|
819 |
$encoding = strtoupper($encoding);
|
820 |
|
821 |
if ('8BIT' === $encoding || 'BINARY' === $encoding) {
|
822 |
return 'CP850';
|
823 |
}
|
|
|
824 |
if ('UTF8' === $encoding) {
|
825 |
return 'UTF-8';
|
826 |
}
|
1 |
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
* This file is part of the Symfony package.
|
5 |
*
|
6 |
* (c) Fabien Potencier <fabien@symfony.com>
|
7 |
*
|
8 |
* For the full copyright and license information, please view the LICENSE
|
9 |
* file that was distributed with this source code.
|
|
|
|
|
10 |
*/
|
11 |
|
12 |
namespace Cyr_To_Lat\Symfony\Polyfill\Mbstring;
|
512 |
$offset = 0;
|
513 |
} elseif ($offset = (int) $offset) {
|
514 |
if ($offset < 0) {
|
515 |
+
if (0 > $offset += self::mb_strlen($needle)) {
|
516 |
+
$haystack = self::mb_substr($haystack, 0, $offset, $encoding);
|
517 |
+
}
|
518 |
$offset = 0;
|
519 |
} else {
|
520 |
$haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding);
|
534 |
return null;
|
535 |
}
|
536 |
|
537 |
+
if (1 > $split_length = (int) $split_length) {
|
538 |
trigger_error('The length of each segment must be greater than zero', E_USER_WARNING);
|
539 |
|
540 |
return false;
|
544 |
$encoding = mb_internal_encoding();
|
545 |
}
|
546 |
|
547 |
+
if ('UTF-8' === $encoding = self::getEncoding($encoding)) {
|
548 |
+
return preg_split("/(.{{$split_length}})/u", $string, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
|
549 |
+
}
|
550 |
+
|
551 |
$result = array();
|
552 |
$length = mb_strlen($string, $encoding);
|
553 |
|
821 |
return self::$internalEncoding;
|
822 |
}
|
823 |
|
824 |
+
if ('UTF-8' === $encoding) {
|
825 |
+
return 'UTF-8';
|
826 |
+
}
|
827 |
+
|
828 |
$encoding = strtoupper($encoding);
|
829 |
|
830 |
if ('8BIT' === $encoding || 'BINARY' === $encoding) {
|
831 |
return 'CP850';
|
832 |
}
|
833 |
+
|
834 |
if ('UTF8' === $encoding) {
|
835 |
return 'UTF-8';
|
836 |
}
|
lib/polyfill-mbstring/bootstrap.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Cyr_To_Lat;
|
4 |
+
|
5 |
+
/*
|
6 |
+
* This file is part of the Symfony package.
|
7 |
+
*
|
8 |
+
* (c) Fabien Potencier <fabien@symfony.com>
|
9 |
+
*
|
10 |
+
* For the full copyright and license information, please view the LICENSE
|
11 |
+
* file that was distributed with this source code.
|
12 |
+
*/
|
13 |
+
use Cyr_To_Lat\Symfony\Polyfill\Mbstring as p;
|
14 |
+
if (!\function_exists('mb_strpos')) {
|
15 |
+
\define('MB_CASE_UPPER', 0);
|
16 |
+
\define('MB_CASE_LOWER', 1);
|
17 |
+
\define('MB_CASE_TITLE', 2);
|
18 |
+
function mb_convert_encoding($s, $to, $from = null)
|
19 |
+
{
|
20 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_convert_encoding($s, $to, $from);
|
21 |
+
}
|
22 |
+
function mb_decode_mimeheader($s)
|
23 |
+
{
|
24 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_decode_mimeheader($s);
|
25 |
+
}
|
26 |
+
function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null)
|
27 |
+
{
|
28 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent);
|
29 |
+
}
|
30 |
+
function mb_decode_numericentity($s, $convmap, $enc = null)
|
31 |
+
{
|
32 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_decode_numericentity($s, $convmap, $enc);
|
33 |
+
}
|
34 |
+
function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = \false)
|
35 |
+
{
|
36 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex);
|
37 |
+
}
|
38 |
+
function mb_convert_case($s, $mode, $enc = null)
|
39 |
+
{
|
40 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_convert_case($s, $mode, $enc);
|
41 |
+
}
|
42 |
+
function mb_internal_encoding($enc = null)
|
43 |
+
{
|
44 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_internal_encoding($enc);
|
45 |
+
}
|
46 |
+
function mb_language($lang = null)
|
47 |
+
{
|
48 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_language($lang);
|
49 |
+
}
|
50 |
+
function mb_list_encodings()
|
51 |
+
{
|
52 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_list_encodings();
|
53 |
+
}
|
54 |
+
function mb_encoding_aliases($encoding)
|
55 |
+
{
|
56 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_encoding_aliases($encoding);
|
57 |
+
}
|
58 |
+
function mb_check_encoding($var = null, $encoding = null)
|
59 |
+
{
|
60 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_check_encoding($var, $encoding);
|
61 |
+
}
|
62 |
+
function mb_detect_encoding($str, $encodingList = null, $strict = \false)
|
63 |
+
{
|
64 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_detect_encoding($str, $encodingList, $strict);
|
65 |
+
}
|
66 |
+
function mb_detect_order($encodingList = null)
|
67 |
+
{
|
68 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_detect_order($encodingList);
|
69 |
+
}
|
70 |
+
function mb_parse_str($s, &$result = array())
|
71 |
+
{
|
72 |
+
\parse_str($s, $result);
|
73 |
+
}
|
74 |
+
if (!\function_exists('mb_strlen')) {
|
75 |
+
function mb_strlen($s, $enc = null)
|
76 |
+
{
|
77 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_strlen($s, $enc);
|
78 |
+
}
|
79 |
+
}
|
80 |
+
function mb_strpos($s, $needle, $offset = 0, $enc = null)
|
81 |
+
{
|
82 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_strpos($s, $needle, $offset, $enc);
|
83 |
+
}
|
84 |
+
function mb_strtolower($s, $enc = null)
|
85 |
+
{
|
86 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_strtolower($s, $enc);
|
87 |
+
}
|
88 |
+
function mb_strtoupper($s, $enc = null)
|
89 |
+
{
|
90 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_strtoupper($s, $enc);
|
91 |
+
}
|
92 |
+
function mb_substitute_character($char = null)
|
93 |
+
{
|
94 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_substitute_character($char);
|
95 |
+
}
|
96 |
+
if (!\function_exists('mb_substr')) {
|
97 |
+
function mb_substr($s, $start, $length = 2147483647, $enc = null)
|
98 |
+
{
|
99 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_substr($s, $start, $length, $enc);
|
100 |
+
}
|
101 |
+
}
|
102 |
+
function mb_stripos($s, $needle, $offset = 0, $enc = null)
|
103 |
+
{
|
104 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_stripos($s, $needle, $offset, $enc);
|
105 |
+
}
|
106 |
+
function mb_stristr($s, $needle, $part = \false, $enc = null)
|
107 |
+
{
|
108 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_stristr($s, $needle, $part, $enc);
|
109 |
+
}
|
110 |
+
function mb_strrchr($s, $needle, $part = \false, $enc = null)
|
111 |
+
{
|
112 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_strrchr($s, $needle, $part, $enc);
|
113 |
+
}
|
114 |
+
function mb_strrichr($s, $needle, $part = \false, $enc = null)
|
115 |
+
{
|
116 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_strrichr($s, $needle, $part, $enc);
|
117 |
+
}
|
118 |
+
function mb_strripos($s, $needle, $offset = 0, $enc = null)
|
119 |
+
{
|
120 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_strripos($s, $needle, $offset, $enc);
|
121 |
+
}
|
122 |
+
function mb_strrpos($s, $needle, $offset = 0, $enc = null)
|
123 |
+
{
|
124 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_strrpos($s, $needle, $offset, $enc);
|
125 |
+
}
|
126 |
+
function mb_strstr($s, $needle, $part = \false, $enc = null)
|
127 |
+
{
|
128 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_strstr($s, $needle, $part, $enc);
|
129 |
+
}
|
130 |
+
function mb_get_info($type = 'all')
|
131 |
+
{
|
132 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_get_info($type);
|
133 |
+
}
|
134 |
+
function mb_http_output($enc = null)
|
135 |
+
{
|
136 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_http_output($enc);
|
137 |
+
}
|
138 |
+
function mb_strwidth($s, $enc = null)
|
139 |
+
{
|
140 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_strwidth($s, $enc);
|
141 |
+
}
|
142 |
+
function mb_substr_count($haystack, $needle, $enc = null)
|
143 |
+
{
|
144 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_substr_count($haystack, $needle, $enc);
|
145 |
+
}
|
146 |
+
function mb_output_handler($contents, $status)
|
147 |
+
{
|
148 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_output_handler($contents, $status);
|
149 |
+
}
|
150 |
+
function mb_http_input($type = '')
|
151 |
+
{
|
152 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_http_input($type);
|
153 |
+
}
|
154 |
+
function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null)
|
155 |
+
{
|
156 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f);
|
157 |
+
}
|
158 |
+
}
|
159 |
+
if (!\function_exists('mb_chr')) {
|
160 |
+
function mb_ord($s, $enc = null)
|
161 |
+
{
|
162 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_ord($s, $enc);
|
163 |
+
}
|
164 |
+
function mb_chr($code, $enc = null)
|
165 |
+
{
|
166 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_chr($code, $enc);
|
167 |
+
}
|
168 |
+
function mb_scrub($s, $enc = null)
|
169 |
+
{
|
170 |
+
$enc = null === $enc ? \mb_internal_encoding() : $enc;
|
171 |
+
return \mb_convert_encoding($s, $enc, $enc);
|
172 |
+
}
|
173 |
+
}
|
174 |
+
if (!\function_exists('mb_str_split')) {
|
175 |
+
function mb_str_split($string, $split_length = 1, $encoding = null)
|
176 |
+
{
|
177 |
+
return \Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring::mb_str_split($string, $split_length, $encoding);
|
178 |
+
}
|
179 |
+
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: SergeyBiryukov, mihdan, karevn, webvitaly, kaggdesign
|
|
3 |
Tags: cyrillic, belorussian, ukrainian, bulgarian, macedonian, georgian, kazakh, latin, l10n, russian, cyr-to-lat, cyr2lat, rustolat, slugs, translations, transliteration
|
4 |
Requires at least: 5.1
|
5 |
Tested up to: 5.3
|
6 |
-
Stable tag: 4.3.
|
7 |
Requires PHP: 5.6.20
|
8 |
|
9 |
Converts Cyrillic characters in post, page and term slugs to Latin characters.
|
@@ -91,6 +91,15 @@ Yes you can!
|
|
91 |
|
92 |
== Changelog ==
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
= 4.3.2 (29.12.2019) =
|
95 |
* Fixed problems with setting of max_input_vars on some hostings
|
96 |
|
3 |
Tags: cyrillic, belorussian, ukrainian, bulgarian, macedonian, georgian, kazakh, latin, l10n, russian, cyr-to-lat, cyr2lat, rustolat, slugs, translations, transliteration
|
4 |
Requires at least: 5.1
|
5 |
Tested up to: 5.3
|
6 |
+
Stable tag: 4.3.3
|
7 |
Requires PHP: 5.6.20
|
8 |
|
9 |
Converts Cyrillic characters in post, page and term slugs to Latin characters.
|
91 |
|
92 |
== Changelog ==
|
93 |
|
94 |
+
= 4.3.3 (14.01.2020) =
|
95 |
+
* Reworked main plugin filter
|
96 |
+
* Improved performance by minimizing number of calls
|
97 |
+
* Updated Georgian table
|
98 |
+
* Fixed slug duplication in taxonomies
|
99 |
+
* Fixed warnings with WooCommerce when mbstring is not loaded
|
100 |
+
* Fixed transliteration of draft post slug
|
101 |
+
* Tables sorted by local alphabets
|
102 |
+
|
103 |
= 4.3.2 (29.12.2019) =
|
104 |
* Fixed problems with setting of max_input_vars on some hostings
|
105 |
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit889b56da8e5c956977b4e015c55d5852::getLoader();
|
vendor/composer/ClassLoader.php
CHANGED
@@ -279,7 +279,7 @@ class ClassLoader
|
|
279 |
*/
|
280 |
public function setApcuPrefix($apcuPrefix)
|
281 |
{
|
282 |
-
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
283 |
}
|
284 |
|
285 |
/**
|
@@ -377,7 +377,7 @@ class ClassLoader
|
|
377 |
$subPath = $class;
|
378 |
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
379 |
$subPath = substr($subPath, 0, $lastPos);
|
380 |
-
$search = $subPath.'\\';
|
381 |
if (isset($this->prefixDirsPsr4[$search])) {
|
382 |
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
383 |
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
279 |
*/
|
280 |
public function setApcuPrefix($apcuPrefix)
|
281 |
{
|
282 |
+
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
283 |
}
|
284 |
|
285 |
/**
|
377 |
$subPath = $class;
|
378 |
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
379 |
$subPath = substr($subPath, 0, $lastPos);
|
380 |
+
$search = $subPath . '\\';
|
381 |
if (isset($this->prefixDirsPsr4[$search])) {
|
382 |
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
383 |
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
vendor/composer/LICENSE
CHANGED
@@ -1,21 +1,56 @@
|
|
|
|
|
|
|
|
|
|
1 |
|
2 |
-
|
|
|
|
|
|
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
to do so, subject to the following conditions:
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
2 |
+
Upstream-Name: Composer
|
3 |
+
Upstream-Contact: Jordi Boggiano <j.boggiano@seld.be>
|
4 |
+
Source: https://github.com/composer/composer
|
5 |
|
6 |
+
Files: *
|
7 |
+
Copyright: 2016, Nils Adermann <naderman@naderman.de>
|
8 |
+
2016, Jordi Boggiano <j.boggiano@seld.be>
|
9 |
+
License: Expat
|
10 |
|
11 |
+
Files: src/Composer/Util/TlsHelper.php
|
12 |
+
Copyright: 2016, Nils Adermann <naderman@naderman.de>
|
13 |
+
2016, Jordi Boggiano <j.boggiano@seld.be>
|
14 |
+
2013, Evan Coury <me@evancoury.com>
|
15 |
+
License: Expat and BSD-2-Clause
|
|
|
16 |
|
17 |
+
License: BSD-2-Clause
|
18 |
+
Redistribution and use in source and binary forms, with or without modification,
|
19 |
+
are permitted provided that the following conditions are met:
|
20 |
+
.
|
21 |
+
* Redistributions of source code must retain the above copyright notice,
|
22 |
+
this list of conditions and the following disclaimer.
|
23 |
+
.
|
24 |
+
* Redistributions in binary form must reproduce the above copyright notice,
|
25 |
+
this list of conditions and the following disclaimer in the documentation
|
26 |
+
and/or other materials provided with the distribution.
|
27 |
+
.
|
28 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
29 |
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
30 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
31 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
32 |
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
33 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
34 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
35 |
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
36 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
37 |
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
38 |
|
39 |
+
License: Expat
|
40 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
41 |
+
of this software and associated documentation files (the "Software"), to deal
|
42 |
+
in the Software without restriction, including without limitation the rights
|
43 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
44 |
+
copies of the Software, and to permit persons to whom the Software is furnished
|
45 |
+
to do so, subject to the following conditions:
|
46 |
+
.
|
47 |
+
The above copyright notice and this permission notice shall be included in all
|
48 |
+
copies or substantial portions of the Software.
|
49 |
+
.
|
50 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
51 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
52 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
53 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
54 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
55 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
56 |
+
THE SOFTWARE.
|
vendor/composer/autoload_files.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_files.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'344a0f93a05b8ca362c22e39586db500' => $baseDir . '/lib/polyfill-mbstring/bootstrap.php',
|
10 |
+
);
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit19d4b07fb39b1ad38f5986a3c11b2a54
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
@@ -47,6 +47,24 @@ class ComposerAutoloaderInit19d4b07fb39b1ad38f5986a3c11b2a54
|
|
47 |
|
48 |
$loader->register(true);
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
return $loader;
|
51 |
}
|
52 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit889b56da8e5c956977b4e015c55d5852
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit889b56da8e5c956977b4e015c55d5852', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit889b56da8e5c956977b4e015c55d5852', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit889b56da8e5c956977b4e015c55d5852::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
47 |
|
48 |
$loader->register(true);
|
49 |
|
50 |
+
if ($useStaticLoader) {
|
51 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit889b56da8e5c956977b4e015c55d5852::$files;
|
52 |
+
} else {
|
53 |
+
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
+
}
|
55 |
+
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
+
composerRequire889b56da8e5c956977b4e015c55d5852($fileIdentifier, $file);
|
57 |
+
}
|
58 |
+
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
+
|
63 |
+
function composerRequire889b56da8e5c956977b4e015c55d5852($fileIdentifier, $file)
|
64 |
+
{
|
65 |
+
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
+
require $file;
|
67 |
+
|
68 |
+
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
69 |
+
}
|
70 |
+
}
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,8 +4,12 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
|
|
|
|
|
|
|
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'C' =>
|
11 |
array (
|
@@ -40,9 +44,9 @@ class ComposerStaticInit19d4b07fb39b1ad38f5986a3c11b2a54
|
|
40 |
public static function getInitializer(ClassLoader $loader)
|
41 |
{
|
42 |
return \Closure::bind(function () use ($loader) {
|
43 |
-
$loader->prefixLengthsPsr4 =
|
44 |
-
$loader->prefixDirsPsr4 =
|
45 |
-
$loader->classMap =
|
46 |
|
47 |
}, null, ClassLoader::class);
|
48 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit889b56da8e5c956977b4e015c55d5852
|
8 |
{
|
9 |
+
public static $files = array (
|
10 |
+
'344a0f93a05b8ca362c22e39586db500' => __DIR__ . '/../..' . '/lib/polyfill-mbstring/bootstrap.php',
|
11 |
+
);
|
12 |
+
|
13 |
public static $prefixLengthsPsr4 = array (
|
14 |
'C' =>
|
15 |
array (
|
44 |
public static function getInitializer(ClassLoader $loader)
|
45 |
{
|
46 |
return \Closure::bind(function () use ($loader) {
|
47 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit889b56da8e5c956977b4e015c55d5852::$prefixLengthsPsr4;
|
48 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit889b56da8e5c956977b4e015c55d5852::$prefixDirsPsr4;
|
49 |
+
$loader->classMap = ComposerStaticInit889b56da8e5c956977b4e015c55d5852::$classMap;
|
50 |
|
51 |
}, null, ClassLoader::class);
|
52 |
}
|
vendor/composer/installers/composer.json
DELETED
@@ -1,107 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "composer/installers",
|
3 |
-
"type": "composer-plugin",
|
4 |
-
"license": "MIT",
|
5 |
-
"description": "A multi-framework Composer library installer",
|
6 |
-
"keywords": [
|
7 |
-
"installer",
|
8 |
-
"Aimeos",
|
9 |
-
"AGL",
|
10 |
-
"AnnotateCms",
|
11 |
-
"Attogram",
|
12 |
-
"Bitrix",
|
13 |
-
"CakePHP",
|
14 |
-
"Chef",
|
15 |
-
"Cockpit",
|
16 |
-
"CodeIgniter",
|
17 |
-
"concrete5",
|
18 |
-
"Craft",
|
19 |
-
"Croogo",
|
20 |
-
"DokuWiki",
|
21 |
-
"Dolibarr",
|
22 |
-
"Drupal",
|
23 |
-
"Elgg",
|
24 |
-
"Eliasis",
|
25 |
-
"ExpressionEngine",
|
26 |
-
"eZ Platform",
|
27 |
-
"FuelPHP",
|
28 |
-
"Grav",
|
29 |
-
"Hurad",
|
30 |
-
"ImageCMS",
|
31 |
-
"iTop",
|
32 |
-
"Joomla",
|
33 |
-
"Kanboard",
|
34 |
-
"Known",
|
35 |
-
"Kohana",
|
36 |
-
"Lan Management System",
|
37 |
-
"Laravel",
|
38 |
-
"Lavalite",
|
39 |
-
"Lithium",
|
40 |
-
"Magento",
|
41 |
-
"majima",
|
42 |
-
"Mako",
|
43 |
-
"Mautic",
|
44 |
-
"Maya",
|
45 |
-
"MODX",
|
46 |
-
"MODX Evo",
|
47 |
-
"MediaWiki",
|
48 |
-
"OXID",
|
49 |
-
"osclass",
|
50 |
-
"MODULEWork",
|
51 |
-
"Moodle",
|
52 |
-
"Piwik",
|
53 |
-
"pxcms",
|
54 |
-
"phpBB",
|
55 |
-
"Plentymarkets",
|
56 |
-
"PPI",
|
57 |
-
"Puppet",
|
58 |
-
"Porto",
|
59 |
-
"RadPHP",
|
60 |
-
"ReIndex",
|
61 |
-
"Roundcube",
|
62 |
-
"shopware",
|
63 |
-
"SilverStripe",
|
64 |
-
"SMF",
|
65 |
-
"SyDES",
|
66 |
-
"symfony",
|
67 |
-
"Thelia",
|
68 |
-
"TYPO3",
|
69 |
-
"WHMCS",
|
70 |
-
"WolfCMS",
|
71 |
-
"WordPress",
|
72 |
-
"YAWIK",
|
73 |
-
"Zend",
|
74 |
-
"Zikula"
|
75 |
-
],
|
76 |
-
"homepage": "https://composer.github.io/installers/",
|
77 |
-
"authors": [
|
78 |
-
{
|
79 |
-
"name": "Kyle Robinson Young",
|
80 |
-
"email": "kyle@dontkry.com",
|
81 |
-
"homepage": "https://github.com/shama"
|
82 |
-
}
|
83 |
-
],
|
84 |
-
"autoload": {
|
85 |
-
"psr-4": { "Composer\\Installers\\": "src/Composer/Installers" }
|
86 |
-
},
|
87 |
-
"extra": {
|
88 |
-
"class": "Composer\\Installers\\Plugin",
|
89 |
-
"branch-alias": {
|
90 |
-
"dev-master": "1.0-dev"
|
91 |
-
}
|
92 |
-
},
|
93 |
-
"replace": {
|
94 |
-
"shama/baton": "*",
|
95 |
-
"roundcube/plugin-installer": "*"
|
96 |
-
},
|
97 |
-
"require": {
|
98 |
-
"composer-plugin-api": "^1.0"
|
99 |
-
},
|
100 |
-
"require-dev": {
|
101 |
-
"composer/composer": "1.0.*@dev",
|
102 |
-
"phpunit/phpunit": "^4.8.36"
|
103 |
-
},
|
104 |
-
"scripts": {
|
105 |
-
"test": "phpunit"
|
106 |
-
}
|
107 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/AglInstaller.php
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class AglInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'More/{$name}/',
|
8 |
-
);
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Format package name to CamelCase
|
12 |
-
*/
|
13 |
-
public function inflectPackageVars($vars)
|
14 |
-
{
|
15 |
-
$vars['name'] = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) {
|
16 |
-
return strtoupper($matches[1]);
|
17 |
-
}, $vars['name']);
|
18 |
-
|
19 |
-
return $vars;
|
20 |
-
}
|
21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class AimeosInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'extension' => 'ext/{$name}/',
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class AnnotateCmsInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'addons/modules/{$name}/',
|
8 |
-
'component' => 'addons/components/{$name}/',
|
9 |
-
'service' => 'addons/services/{$name}/',
|
10 |
-
);
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class AsgardInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'Modules/{$name}/',
|
8 |
-
'theme' => 'Themes/{$name}/'
|
9 |
-
);
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Format package name.
|
13 |
-
*
|
14 |
-
* For package type asgard-module, cut off a trailing '-plugin' if present.
|
15 |
-
*
|
16 |
-
* For package type asgard-theme, cut off a trailing '-theme' if present.
|
17 |
-
*
|
18 |
-
*/
|
19 |
-
public function inflectPackageVars($vars)
|
20 |
-
{
|
21 |
-
if ($vars['type'] === 'asgard-module') {
|
22 |
-
return $this->inflectPluginVars($vars);
|
23 |
-
}
|
24 |
-
|
25 |
-
if ($vars['type'] === 'asgard-theme') {
|
26 |
-
return $this->inflectThemeVars($vars);
|
27 |
-
}
|
28 |
-
|
29 |
-
return $vars;
|
30 |
-
}
|
31 |
-
|
32 |
-
protected function inflectPluginVars($vars)
|
33 |
-
{
|
34 |
-
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
|
35 |
-
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
36 |
-
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
37 |
-
|
38 |
-
return $vars;
|
39 |
-
}
|
40 |
-
|
41 |
-
protected function inflectThemeVars($vars)
|
42 |
-
{
|
43 |
-
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
44 |
-
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
45 |
-
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
46 |
-
|
47 |
-
return $vars;
|
48 |
-
}
|
49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class AttogramInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'modules/{$name}/',
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/BaseInstaller.php
DELETED
@@ -1,136 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
use Composer\IO\IOInterface;
|
5 |
-
use Composer\Composer;
|
6 |
-
use Composer\Package\PackageInterface;
|
7 |
-
|
8 |
-
abstract class BaseInstaller
|
9 |
-
{
|
10 |
-
protected $locations = array();
|
11 |
-
protected $composer;
|
12 |
-
protected $package;
|
13 |
-
protected $io;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Initializes base installer.
|
17 |
-
*
|
18 |
-
* @param PackageInterface $package
|
19 |
-
* @param Composer $composer
|
20 |
-
* @param IOInterface $io
|
21 |
-
*/
|
22 |
-
public function __construct(PackageInterface $package = null, Composer $composer = null, IOInterface $io = null)
|
23 |
-
{
|
24 |
-
$this->composer = $composer;
|
25 |
-
$this->package = $package;
|
26 |
-
$this->io = $io;
|
27 |
-
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Return the install path based on package type.
|
31 |
-
*
|
32 |
-
* @param PackageInterface $package
|
33 |
-
* @param string $frameworkType
|
34 |
-
* @return string
|
35 |
-
*/
|
36 |
-
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
37 |
-
{
|
38 |
-
$type = $this->package->getType();
|
39 |
-
|
40 |
-
$prettyName = $this->package->getPrettyName();
|
41 |
-
if (strpos($prettyName, '/') !== false) {
|
42 |
-
list($vendor, $name) = explode('/', $prettyName);
|
43 |
-
} else {
|
44 |
-
$vendor = '';
|
45 |
-
$name = $prettyName;
|
46 |
-
}
|
47 |
-
|
48 |
-
$availableVars = $this->inflectPackageVars(compact('name', 'vendor', 'type'));
|
49 |
-
|
50 |
-
$extra = $package->getExtra();
|
51 |
-
if (!empty($extra['installer-name'])) {
|
52 |
-
$availableVars['name'] = $extra['installer-name'];
|
53 |
-
}
|
54 |
-
|
55 |
-
if ($this->composer->getPackage()) {
|
56 |
-
$extra = $this->composer->getPackage()->getExtra();
|
57 |
-
if (!empty($extra['installer-paths'])) {
|
58 |
-
$customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor);
|
59 |
-
if ($customPath !== false) {
|
60 |
-
return $this->templatePath($customPath, $availableVars);
|
61 |
-
}
|
62 |
-
}
|
63 |
-
}
|
64 |
-
|
65 |
-
$packageType = substr($type, strlen($frameworkType) + 1);
|
66 |
-
$locations = $this->getLocations();
|
67 |
-
if (!isset($locations[$packageType])) {
|
68 |
-
throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type));
|
69 |
-
}
|
70 |
-
|
71 |
-
return $this->templatePath($locations[$packageType], $availableVars);
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* For an installer to override to modify the vars per installer.
|
76 |
-
*
|
77 |
-
* @param array $vars
|
78 |
-
* @return array
|
79 |
-
*/
|
80 |
-
public function inflectPackageVars($vars)
|
81 |
-
{
|
82 |
-
return $vars;
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Gets the installer's locations
|
87 |
-
*
|
88 |
-
* @return array
|
89 |
-
*/
|
90 |
-
public function getLocations()
|
91 |
-
{
|
92 |
-
return $this->locations;
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Replace vars in a path
|
97 |
-
*
|
98 |
-
* @param string $path
|
99 |
-
* @param array $vars
|
100 |
-
* @return string
|
101 |
-
*/
|
102 |
-
protected function templatePath($path, array $vars = array())
|
103 |
-
{
|
104 |
-
if (strpos($path, '{') !== false) {
|
105 |
-
extract($vars);
|
106 |
-
preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches);
|
107 |
-
if (!empty($matches[1])) {
|
108 |
-
foreach ($matches[1] as $var) {
|
109 |
-
$path = str_replace('{$' . $var . '}', $$var, $path);
|
110 |
-
}
|
111 |
-
}
|
112 |
-
}
|
113 |
-
|
114 |
-
return $path;
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* Search through a passed paths array for a custom install path.
|
119 |
-
*
|
120 |
-
* @param array $paths
|
121 |
-
* @param string $name
|
122 |
-
* @param string $type
|
123 |
-
* @param string $vendor = NULL
|
124 |
-
* @return string
|
125 |
-
*/
|
126 |
-
protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
|
127 |
-
{
|
128 |
-
foreach ($paths as $path => $names) {
|
129 |
-
if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
|
130 |
-
return $path;
|
131 |
-
}
|
132 |
-
}
|
133 |
-
|
134 |
-
return false;
|
135 |
-
}
|
136 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php
DELETED
@@ -1,126 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Composer\Installers;
|
4 |
-
|
5 |
-
use Composer\Util\Filesystem;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Installer for Bitrix Framework. Supported types of extensions:
|
9 |
-
* - `bitrix-d7-module` — copy the module to directory `bitrix/modules/<vendor>.<name>`.
|
10 |
-
* - `bitrix-d7-component` — copy the component to directory `bitrix/components/<vendor>/<name>`.
|
11 |
-
* - `bitrix-d7-template` — copy the template to directory `bitrix/templates/<vendor>_<name>`.
|
12 |
-
*
|
13 |
-
* You can set custom path to directory with Bitrix kernel in `composer.json`:
|
14 |
-
*
|
15 |
-
* ```json
|
16 |
-
* {
|
17 |
-
* "extra": {
|
18 |
-
* "bitrix-dir": "s1/bitrix"
|
19 |
-
* }
|
20 |
-
* }
|
21 |
-
* ```
|
22 |
-
*
|
23 |
-
* @author Nik Samokhvalov <nik@samokhvalov.info>
|
24 |
-
* @author Denis Kulichkin <onexhovia@gmail.com>
|
25 |
-
*/
|
26 |
-
class BitrixInstaller extends BaseInstaller
|
27 |
-
{
|
28 |
-
protected $locations = array(
|
29 |
-
'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
30 |
-
'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
31 |
-
'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
32 |
-
'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/',
|
33 |
-
'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/',
|
34 |
-
'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/',
|
35 |
-
);
|
36 |
-
|
37 |
-
/**
|
38 |
-
* @var array Storage for informations about duplicates at all the time of installation packages.
|
39 |
-
*/
|
40 |
-
private static $checkedDuplicates = array();
|
41 |
-
|
42 |
-
/**
|
43 |
-
* {@inheritdoc}
|
44 |
-
*/
|
45 |
-
public function inflectPackageVars($vars)
|
46 |
-
{
|
47 |
-
if ($this->composer->getPackage()) {
|
48 |
-
$extra = $this->composer->getPackage()->getExtra();
|
49 |
-
|
50 |
-
if (isset($extra['bitrix-dir'])) {
|
51 |
-
$vars['bitrix_dir'] = $extra['bitrix-dir'];
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
if (!isset($vars['bitrix_dir'])) {
|
56 |
-
$vars['bitrix_dir'] = 'bitrix';
|
57 |
-
}
|
58 |
-
|
59 |
-
return parent::inflectPackageVars($vars);
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* {@inheritdoc}
|
64 |
-
*/
|
65 |
-
protected function templatePath($path, array $vars = array())
|
66 |
-
{
|
67 |
-
$templatePath = parent::templatePath($path, $vars);
|
68 |
-
$this->checkDuplicates($templatePath, $vars);
|
69 |
-
|
70 |
-
return $templatePath;
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Duplicates search packages.
|
75 |
-
*
|
76 |
-
* @param string $path
|
77 |
-
* @param array $vars
|
78 |
-
*/
|
79 |
-
protected function checkDuplicates($path, array $vars = array())
|
80 |
-
{
|
81 |
-
$packageType = substr($vars['type'], strlen('bitrix') + 1);
|
82 |
-
$localDir = explode('/', $vars['bitrix_dir']);
|
83 |
-
array_pop($localDir);
|
84 |
-
$localDir[] = 'local';
|
85 |
-
$localDir = implode('/', $localDir);
|
86 |
-
|
87 |
-
$oldPath = str_replace(
|
88 |
-
array('{$bitrix_dir}', '{$name}'),
|
89 |
-
array($localDir, $vars['name']),
|
90 |
-
$this->locations[$packageType]
|
91 |
-
);
|
92 |
-
|
93 |
-
if (in_array($oldPath, static::$checkedDuplicates)) {
|
94 |
-
return;
|
95 |
-
}
|
96 |
-
|
97 |
-
if ($oldPath !== $path && file_exists($oldPath) && $this->io && $this->io->isInteractive()) {
|
98 |
-
|
99 |
-
$this->io->writeError(' <error>Duplication of packages:</error>');
|
100 |
-
$this->io->writeError(' <info>Package ' . $oldPath . ' will be called instead package ' . $path . '</info>');
|
101 |
-
|
102 |
-
while (true) {
|
103 |
-
switch ($this->io->ask(' <info>Delete ' . $oldPath . ' [y,n,?]?</info> ', '?')) {
|
104 |
-
case 'y':
|
105 |
-
$fs = new Filesystem();
|
106 |
-
$fs->removeDirectory($oldPath);
|
107 |
-
break 2;
|
108 |
-
|
109 |
-
case 'n':
|
110 |
-
break 2;
|
111 |
-
|
112 |
-
case '?':
|
113 |
-
default:
|
114 |
-
$this->io->writeError(array(
|
115 |
-
' y - delete package ' . $oldPath . ' and to continue with the installation',
|
116 |
-
' n - don\'t delete and to continue with the installation',
|
117 |
-
));
|
118 |
-
$this->io->writeError(' ? - print help');
|
119 |
-
break;
|
120 |
-
}
|
121 |
-
}
|
122 |
-
}
|
123 |
-
|
124 |
-
static::$checkedDuplicates[] = $oldPath;
|
125 |
-
}
|
126 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class BonefishInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'package' => 'Packages/{$vendor}/{$name}/'
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
DELETED
@@ -1,82 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
use Composer\DependencyResolver\Pool;
|
5 |
-
|
6 |
-
class CakePHPInstaller extends BaseInstaller
|
7 |
-
{
|
8 |
-
protected $locations = array(
|
9 |
-
'plugin' => 'Plugin/{$name}/',
|
10 |
-
);
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Format package name to CamelCase
|
14 |
-
*/
|
15 |
-
public function inflectPackageVars($vars)
|
16 |
-
{
|
17 |
-
if ($this->matchesCakeVersion('>=', '3.0.0')) {
|
18 |
-
return $vars;
|
19 |
-
}
|
20 |
-
|
21 |
-
$nameParts = explode('/', $vars['name']);
|
22 |
-
foreach ($nameParts as &$value) {
|
23 |
-
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
|
24 |
-
$value = str_replace(array('-', '_'), ' ', $value);
|
25 |
-
$value = str_replace(' ', '', ucwords($value));
|
26 |
-
}
|
27 |
-
$vars['name'] = implode('/', $nameParts);
|
28 |
-
|
29 |
-
return $vars;
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Change the default plugin location when cakephp >= 3.0
|
34 |
-
*/
|
35 |
-
public function getLocations()
|
36 |
-
{
|
37 |
-
if ($this->matchesCakeVersion('>=', '3.0.0')) {
|
38 |
-
$this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
|
39 |
-
}
|
40 |
-
return $this->locations;
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Check if CakePHP version matches against a version
|
45 |
-
*
|
46 |
-
* @param string $matcher
|
47 |
-
* @param string $version
|
48 |
-
* @return bool
|
49 |
-
*/
|
50 |
-
protected function matchesCakeVersion($matcher, $version)
|
51 |
-
{
|
52 |
-
if (class_exists('Composer\Semver\Constraint\MultiConstraint')) {
|
53 |
-
$multiClass = 'Composer\Semver\Constraint\MultiConstraint';
|
54 |
-
$constraintClass = 'Composer\Semver\Constraint\Constraint';
|
55 |
-
} else {
|
56 |
-
$multiClass = 'Composer\Package\LinkConstraint\MultiConstraint';
|
57 |
-
$constraintClass = 'Composer\Package\LinkConstraint\VersionConstraint';
|
58 |
-
}
|
59 |
-
|
60 |
-
$repositoryManager = $this->composer->getRepositoryManager();
|
61 |
-
if ($repositoryManager) {
|
62 |
-
$repos = $repositoryManager->getLocalRepository();
|
63 |
-
if (!$repos) {
|
64 |
-
return false;
|
65 |
-
}
|
66 |
-
$cake3 = new $multiClass(array(
|
67 |
-
new $constraintClass($matcher, $version),
|
68 |
-
new $constraintClass('!=', '9999999-dev'),
|
69 |
-
));
|
70 |
-
$pool = new Pool('dev');
|
71 |
-
$pool->addRepository($repos);
|
72 |
-
$packages = $pool->whatProvides('cakephp/cakephp');
|
73 |
-
foreach ($packages as $package) {
|
74 |
-
$installed = new $constraintClass('=', $package->getVersion());
|
75 |
-
if ($cake3->matches($installed)) {
|
76 |
-
return true;
|
77 |
-
}
|
78 |
-
}
|
79 |
-
}
|
80 |
-
return false;
|
81 |
-
}
|
82 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/ChefInstaller.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class ChefInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'cookbook' => 'Chef/{$vendor}/{$name}/',
|
8 |
-
'role' => 'Chef/roles/{$name}/',
|
9 |
-
);
|
10 |
-
}
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class CiviCrmInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'ext' => 'ext/{$name}/'
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class ClanCatsFrameworkInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'ship' => 'CCF/orbit/{$name}/',
|
8 |
-
'theme' => 'CCF/app/themes/{$name}/',
|
9 |
-
);
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class CockpitInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'cockpit/modules/addons/{$name}/',
|
8 |
-
);
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Format module name.
|
12 |
-
*
|
13 |
-
* Strip `module-` prefix from package name.
|
14 |
-
*
|
15 |
-
* @param array @vars
|
16 |
-
*
|
17 |
-
* @return array
|
18 |
-
*/
|
19 |
-
public function inflectPackageVars($vars)
|
20 |
-
{
|
21 |
-
if ($vars['type'] == 'cockpit-module') {
|
22 |
-
return $this->inflectModuleVars($vars);
|
23 |
-
}
|
24 |
-
|
25 |
-
return $vars;
|
26 |
-
}
|
27 |
-
|
28 |
-
public function inflectModuleVars($vars)
|
29 |
-
{
|
30 |
-
$vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name']));
|
31 |
-
|
32 |
-
return $vars;
|
33 |
-
}
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class CodeIgniterInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'library' => 'application/libraries/{$name}/',
|
8 |
-
'third-party' => 'application/third_party/{$name}/',
|
9 |
-
'module' => 'application/modules/{$name}/',
|
10 |
-
);
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class Concrete5Installer extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'core' => 'concrete/',
|
8 |
-
'block' => 'application/blocks/{$name}/',
|
9 |
-
'package' => 'packages/{$name}/',
|
10 |
-
'theme' => 'application/themes/{$name}/',
|
11 |
-
'update' => 'updates/{$name}/',
|
12 |
-
);
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/CraftInstaller.php
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Installer for Craft Plugins
|
6 |
-
*/
|
7 |
-
class CraftInstaller extends BaseInstaller
|
8 |
-
{
|
9 |
-
const NAME_PREFIX = 'craft';
|
10 |
-
const NAME_SUFFIX = 'plugin';
|
11 |
-
|
12 |
-
protected $locations = array(
|
13 |
-
'plugin' => 'craft/plugins/{$name}/',
|
14 |
-
);
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Strip `craft-` prefix and/or `-plugin` suffix from package names
|
18 |
-
*
|
19 |
-
* @param array $vars
|
20 |
-
*
|
21 |
-
* @return array
|
22 |
-
*/
|
23 |
-
final public function inflectPackageVars($vars)
|
24 |
-
{
|
25 |
-
return $this->inflectPluginVars($vars);
|
26 |
-
}
|
27 |
-
|
28 |
-
private function inflectPluginVars($vars)
|
29 |
-
{
|
30 |
-
$vars['name'] = preg_replace('/-' . self::NAME_SUFFIX . '$/i', '', $vars['name']);
|
31 |
-
$vars['name'] = preg_replace('/^' . self::NAME_PREFIX . '-/i', '', $vars['name']);
|
32 |
-
|
33 |
-
return $vars;
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class CroogoInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => 'Plugin/{$name}/',
|
8 |
-
'theme' => 'View/Themed/{$name}/',
|
9 |
-
);
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Format package name to CamelCase
|
13 |
-
*/
|
14 |
-
public function inflectPackageVars($vars)
|
15 |
-
{
|
16 |
-
$vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
|
17 |
-
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
18 |
-
|
19 |
-
return $vars;
|
20 |
-
}
|
21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class DecibelInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
/** @var array */
|
7 |
-
protected $locations = array(
|
8 |
-
'app' => 'app/{$name}/',
|
9 |
-
);
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/DframeInstaller.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Composer\Installers;
|
4 |
-
|
5 |
-
class DframeInstaller extends BaseInstaller
|
6 |
-
{
|
7 |
-
protected $locations = array(
|
8 |
-
'module' => 'modules/{$vendor}/{$name}/',
|
9 |
-
);
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class DokuWikiInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => 'lib/plugins/{$name}/',
|
8 |
-
'template' => 'lib/tpl/{$name}/',
|
9 |
-
);
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Format package name.
|
13 |
-
*
|
14 |
-
* For package type dokuwiki-plugin, cut off a trailing '-plugin',
|
15 |
-
* or leading dokuwiki_ if present.
|
16 |
-
*
|
17 |
-
* For package type dokuwiki-template, cut off a trailing '-template' if present.
|
18 |
-
*
|
19 |
-
*/
|
20 |
-
public function inflectPackageVars($vars)
|
21 |
-
{
|
22 |
-
|
23 |
-
if ($vars['type'] === 'dokuwiki-plugin') {
|
24 |
-
return $this->inflectPluginVars($vars);
|
25 |
-
}
|
26 |
-
|
27 |
-
if ($vars['type'] === 'dokuwiki-template') {
|
28 |
-
return $this->inflectTemplateVars($vars);
|
29 |
-
}
|
30 |
-
|
31 |
-
return $vars;
|
32 |
-
}
|
33 |
-
|
34 |
-
protected function inflectPluginVars($vars)
|
35 |
-
{
|
36 |
-
$vars['name'] = preg_replace('/-plugin$/', '', $vars['name']);
|
37 |
-
$vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
|
38 |
-
|
39 |
-
return $vars;
|
40 |
-
}
|
41 |
-
|
42 |
-
protected function inflectTemplateVars($vars)
|
43 |
-
{
|
44 |
-
$vars['name'] = preg_replace('/-template$/', '', $vars['name']);
|
45 |
-
$vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
|
46 |
-
|
47 |
-
return $vars;
|
48 |
-
}
|
49 |
-
|
50 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Class DolibarrInstaller
|
6 |
-
*
|
7 |
-
* @package Composer\Installers
|
8 |
-
* @author Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
9 |
-
*/
|
10 |
-
class DolibarrInstaller extends BaseInstaller
|
11 |
-
{
|
12 |
-
//TODO: Add support for scripts and themes
|
13 |
-
protected $locations = array(
|
14 |
-
'module' => 'htdocs/custom/{$name}/',
|
15 |
-
);
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class DrupalInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'core' => 'core/',
|
8 |
-
'module' => 'modules/{$name}/',
|
9 |
-
'theme' => 'themes/{$name}/',
|
10 |
-
'library' => 'libraries/{$name}/',
|
11 |
-
'profile' => 'profiles/{$name}/',
|
12 |
-
'drush' => 'drush/{$name}/',
|
13 |
-
'custom-theme' => 'themes/custom/{$name}/',
|
14 |
-
'custom-module' => 'modules/custom/{$name}/',
|
15 |
-
'custom-profile' => 'profiles/custom/{$name}/',
|
16 |
-
'drupal-multisite' => 'sites/{$name}/',
|
17 |
-
'console' => 'console/{$name}/',
|
18 |
-
'console-language' => 'console/language/{$name}/',
|
19 |
-
);
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/ElggInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class ElggInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => 'mod/{$name}/',
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class EliasisInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'component' => 'components/{$name}/',
|
8 |
-
'module' => 'modules/{$name}/',
|
9 |
-
'plugin' => 'plugins/{$name}/',
|
10 |
-
'template' => 'templates/{$name}/',
|
11 |
-
);
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
use Composer\Package\PackageInterface;
|
5 |
-
|
6 |
-
class ExpressionEngineInstaller extends BaseInstaller
|
7 |
-
{
|
8 |
-
|
9 |
-
protected $locations = array();
|
10 |
-
|
11 |
-
private $ee2Locations = array(
|
12 |
-
'addon' => 'system/expressionengine/third_party/{$name}/',
|
13 |
-
'theme' => 'themes/third_party/{$name}/',
|
14 |
-
);
|
15 |
-
|
16 |
-
private $ee3Locations = array(
|
17 |
-
'addon' => 'system/user/addons/{$name}/',
|
18 |
-
'theme' => 'themes/user/{$name}/',
|
19 |
-
);
|
20 |
-
|
21 |
-
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
22 |
-
{
|
23 |
-
|
24 |
-
$version = "{$frameworkType}Locations";
|
25 |
-
$this->locations = $this->$version;
|
26 |
-
|
27 |
-
return parent::getInstallPath($package, $frameworkType);
|
28 |
-
}
|
29 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class EzPlatformInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'meta-assets' => 'web/assets/ezplatform/',
|
8 |
-
'assets' => 'web/assets/ezplatform/{$name}/',
|
9 |
-
);
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/FuelInstaller.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class FuelInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'fuel/app/modules/{$name}/',
|
8 |
-
'package' => 'fuel/packages/{$name}/',
|
9 |
-
'theme' => 'fuel/app/themes/{$name}/',
|
10 |
-
);
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class FuelphpInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'component' => 'components/{$name}/',
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/GravInstaller.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class GravInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => 'user/plugins/{$name}/',
|
8 |
-
'theme' => 'user/themes/{$name}/',
|
9 |
-
);
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Format package name
|
13 |
-
*
|
14 |
-
* @param array $vars
|
15 |
-
*
|
16 |
-
* @return array
|
17 |
-
*/
|
18 |
-
public function inflectPackageVars($vars)
|
19 |
-
{
|
20 |
-
$restrictedWords = implode('|', array_keys($this->locations));
|
21 |
-
|
22 |
-
$vars['name'] = strtolower($vars['name']);
|
23 |
-
$vars['name'] = preg_replace('/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui',
|
24 |
-
'$1',
|
25 |
-
$vars['name']
|
26 |
-
);
|
27 |
-
|
28 |
-
return $vars;
|
29 |
-
}
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/HuradInstaller.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class HuradInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => 'plugins/{$name}/',
|
8 |
-
'theme' => 'plugins/{$name}/',
|
9 |
-
);
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Format package name to CamelCase
|
13 |
-
*/
|
14 |
-
public function inflectPackageVars($vars)
|
15 |
-
{
|
16 |
-
$nameParts = explode('/', $vars['name']);
|
17 |
-
foreach ($nameParts as &$value) {
|
18 |
-
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
|
19 |
-
$value = str_replace(array('-', '_'), ' ', $value);
|
20 |
-
$value = str_replace(' ', '', ucwords($value));
|
21 |
-
}
|
22 |
-
$vars['name'] = implode('/', $nameParts);
|
23 |
-
return $vars;
|
24 |
-
}
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class ImageCMSInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'template' => 'templates/{$name}/',
|
8 |
-
'module' => 'application/modules/{$name}/',
|
9 |
-
'library' => 'application/libraries/{$name}/',
|
10 |
-
);
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/Installer.php
DELETED
@@ -1,278 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Composer\Installers;
|
4 |
-
|
5 |
-
use Composer\Composer;
|
6 |
-
use Composer\Installer\BinaryInstaller;
|
7 |
-
use Composer\Installer\LibraryInstaller;
|
8 |
-
use Composer\IO\IOInterface;
|
9 |
-
use Composer\Package\PackageInterface;
|
10 |
-
use Composer\Repository\InstalledRepositoryInterface;
|
11 |
-
use Composer\Util\Filesystem;
|
12 |
-
|
13 |
-
class Installer extends LibraryInstaller
|
14 |
-
{
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Package types to installer class map
|
18 |
-
*
|
19 |
-
* @var array
|
20 |
-
*/
|
21 |
-
private $supportedTypes = array(
|
22 |
-
'aimeos' => 'AimeosInstaller',
|
23 |
-
'asgard' => 'AsgardInstaller',
|
24 |
-
'attogram' => 'AttogramInstaller',
|
25 |
-
'agl' => 'AglInstaller',
|
26 |
-
'annotatecms' => 'AnnotateCmsInstaller',
|
27 |
-
'bitrix' => 'BitrixInstaller',
|
28 |
-
'bonefish' => 'BonefishInstaller',
|
29 |
-
'cakephp' => 'CakePHPInstaller',
|
30 |
-
'chef' => 'ChefInstaller',
|
31 |
-
'civicrm' => 'CiviCrmInstaller',
|
32 |
-
'ccframework' => 'ClanCatsFrameworkInstaller',
|
33 |
-
'cockpit' => 'CockpitInstaller',
|
34 |
-
'codeigniter' => 'CodeIgniterInstaller',
|
35 |
-
'concrete5' => 'Concrete5Installer',
|
36 |
-
'craft' => 'CraftInstaller',
|
37 |
-
'croogo' => 'CroogoInstaller',
|
38 |
-
'dframe' => 'DframeInstaller',
|
39 |
-
'dokuwiki' => 'DokuWikiInstaller',
|
40 |
-
'dolibarr' => 'DolibarrInstaller',
|
41 |
-
'decibel' => 'DecibelInstaller',
|
42 |
-
'drupal' => 'DrupalInstaller',
|
43 |
-
'elgg' => 'ElggInstaller',
|
44 |
-
'eliasis' => 'EliasisInstaller',
|
45 |
-
'ee3' => 'ExpressionEngineInstaller',
|
46 |
-
'ee2' => 'ExpressionEngineInstaller',
|
47 |
-
'ezplatform' => 'EzPlatformInstaller',
|
48 |
-
'fuel' => 'FuelInstaller',
|
49 |
-
'fuelphp' => 'FuelphpInstaller',
|
50 |
-
'grav' => 'GravInstaller',
|
51 |
-
'hurad' => 'HuradInstaller',
|
52 |
-
'imagecms' => 'ImageCMSInstaller',
|
53 |
-
'itop' => 'ItopInstaller',
|
54 |
-
'joomla' => 'JoomlaInstaller',
|
55 |
-
'kanboard' => 'KanboardInstaller',
|
56 |
-
'kirby' => 'KirbyInstaller',
|
57 |
-
'known' => 'KnownInstaller',
|
58 |
-
'kodicms' => 'KodiCMSInstaller',
|
59 |
-
'kohana' => 'KohanaInstaller',
|
60 |
-
'lms' => 'LanManagementSystemInstaller',
|
61 |
-
'laravel' => 'LaravelInstaller',
|
62 |
-
'lavalite' => 'LavaLiteInstaller',
|
63 |
-
'lithium' => 'LithiumInstaller',
|
64 |
-
'magento' => 'MagentoInstaller',
|
65 |
-
'majima' => 'MajimaInstaller',
|
66 |
-
'mako' => 'MakoInstaller',
|
67 |
-
'maya' => 'MayaInstaller',
|
68 |
-
'mautic' => 'MauticInstaller',
|
69 |
-
'mediawiki' => 'MediaWikiInstaller',
|
70 |
-
'microweber' => 'MicroweberInstaller',
|
71 |
-
'modulework' => 'MODULEWorkInstaller',
|
72 |
-
'modx' => 'ModxInstaller',
|
73 |
-
'modxevo' => 'MODXEvoInstaller',
|
74 |
-
'moodle' => 'MoodleInstaller',
|
75 |
-
'october' => 'OctoberInstaller',
|
76 |
-
'ontowiki' => 'OntoWikiInstaller',
|
77 |
-
'oxid' => 'OxidInstaller',
|
78 |
-
'osclass' => 'OsclassInstaller',
|
79 |
-
'pxcms' => 'PxcmsInstaller',
|
80 |
-
'phpbb' => 'PhpBBInstaller',
|
81 |
-
'pimcore' => 'PimcoreInstaller',
|
82 |
-
'piwik' => 'PiwikInstaller',
|
83 |
-
'plentymarkets'=> 'PlentymarketsInstaller',
|
84 |
-
'ppi' => 'PPIInstaller',
|
85 |
-
'puppet' => 'PuppetInstaller',
|
86 |
-
'radphp' => 'RadPHPInstaller',
|
87 |
-
'phifty' => 'PhiftyInstaller',
|
88 |
-
'porto' => 'PortoInstaller',
|
89 |
-
'redaxo' => 'RedaxoInstaller',
|
90 |
-
'redaxo5' => 'Redaxo5Installer',
|
91 |
-
'reindex' => 'ReIndexInstaller',
|
92 |
-
'roundcube' => 'RoundcubeInstaller',
|
93 |
-
'shopware' => 'ShopwareInstaller',
|
94 |
-
'sitedirect' => 'SiteDirectInstaller',
|
95 |
-
'silverstripe' => 'SilverStripeInstaller',
|
96 |
-
'smf' => 'SMFInstaller',
|
97 |
-
'sydes' => 'SyDESInstaller',
|
98 |
-
'symfony1' => 'Symfony1Installer',
|
99 |
-
'tao' => 'TaoInstaller',
|
100 |
-
'thelia' => 'TheliaInstaller',
|
101 |
-
'tusk' => 'TuskInstaller',
|
102 |
-
'typo3-cms' => 'TYPO3CmsInstaller',
|
103 |
-
'typo3-flow' => 'TYPO3FlowInstaller',
|
104 |
-
'userfrosting' => 'UserFrostingInstaller',
|
105 |
-
'vanilla' => 'VanillaInstaller',
|
106 |
-
'whmcs' => 'WHMCSInstaller',
|
107 |
-
'wolfcms' => 'WolfCMSInstaller',
|
108 |
-
'wordpress' => 'WordPressInstaller',
|
109 |
-
'yawik' => 'YawikInstaller',
|
110 |
-
'zend' => 'ZendInstaller',
|
111 |
-
'zikula' => 'ZikulaInstaller',
|
112 |
-
'prestashop' => 'PrestashopInstaller'
|
113 |
-
);
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Installer constructor.
|
117 |
-
*
|
118 |
-
* Disables installers specified in main composer extra installer-disable
|
119 |
-
* list
|
120 |
-
*
|
121 |
-
* @param IOInterface $io
|
122 |
-
* @param Composer $composer
|
123 |
-
* @param string $type
|
124 |
-
* @param Filesystem|null $filesystem
|
125 |
-
* @param BinaryInstaller|null $binaryInstaller
|
126 |
-
*/
|
127 |
-
public function __construct(
|
128 |
-
IOInterface $io,
|
129 |
-
Composer $composer,
|
130 |
-
$type = 'library',
|
131 |
-
Filesystem $filesystem = null,
|
132 |
-
BinaryInstaller $binaryInstaller = null
|
133 |
-
) {
|
134 |
-
parent::__construct($io, $composer, $type, $filesystem,
|
135 |
-
$binaryInstaller);
|
136 |
-
$this->removeDisabledInstallers();
|
137 |
-
}
|
138 |
-
|
139 |
-
/**
|
140 |
-
* {@inheritDoc}
|
141 |
-
*/
|
142 |
-
public function getInstallPath(PackageInterface $package)
|
143 |
-
{
|
144 |
-
$type = $package->getType();
|
145 |
-
$frameworkType = $this->findFrameworkType($type);
|
146 |
-
|
147 |
-
if ($frameworkType === false) {
|
148 |
-
throw new \InvalidArgumentException(
|
149 |
-
'Sorry the package type of this package is not yet supported.'
|
150 |
-
);
|
151 |
-
}
|
152 |
-
|
153 |
-
$class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
|
154 |
-
$installer = new $class($package, $this->composer, $this->getIO());
|
155 |
-
|
156 |
-
return $installer->getInstallPath($package, $frameworkType);
|
157 |
-
}
|
158 |
-
|
159 |
-
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
|
160 |
-
{
|
161 |
-
parent::uninstall($repo, $package);
|
162 |
-
$installPath = $this->getPackageBasePath($package);
|
163 |
-
$this->io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
|
164 |
-
}
|
165 |
-
|
166 |
-
/**
|
167 |
-
* {@inheritDoc}
|
168 |
-
*/
|
169 |
-
public function supports($packageType)
|
170 |
-
{
|
171 |
-
$frameworkType = $this->findFrameworkType($packageType);
|
172 |
-
|
173 |
-
if ($frameworkType === false) {
|
174 |
-
return false;
|
175 |
-
}
|
176 |
-
|
177 |
-
$locationPattern = $this->getLocationPattern($frameworkType);
|
178 |
-
|
179 |
-
return preg_match('#' . $frameworkType . '-' . $locationPattern . '#', $packageType, $matches) === 1;
|
180 |
-
}
|
181 |
-
|
182 |
-
/**
|
183 |
-
* Finds a supported framework type if it exists and returns it
|
184 |
-
*
|
185 |
-
* @param string $type
|
186 |
-
* @return string
|
187 |
-
*/
|
188 |
-
protected function findFrameworkType($type)
|
189 |
-
{
|
190 |
-
$frameworkType = false;
|
191 |
-
|
192 |
-
krsort($this->supportedTypes);
|
193 |
-
|
194 |
-
foreach ($this->supportedTypes as $key => $val) {
|
195 |
-
if ($key === substr($type, 0, strlen($key))) {
|
196 |
-
$frameworkType = substr($type, 0, strlen($key));
|
197 |
-
break;
|
198 |
-
}
|
199 |
-
}
|
200 |
-
|
201 |
-
return $frameworkType;
|
202 |
-
}
|
203 |
-
|
204 |
-
/**
|
205 |
-
* Get the second part of the regular expression to check for support of a
|
206 |
-
* package type
|
207 |
-
*
|
208 |
-
* @param string $frameworkType
|
209 |
-
* @return string
|
210 |
-
*/
|
211 |
-
protected function getLocationPattern($frameworkType)
|
212 |
-
{
|
213 |
-
$pattern = false;
|
214 |
-
if (!empty($this->supportedTypes[$frameworkType])) {
|
215 |
-
$frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
|
216 |
-
/** @var BaseInstaller $framework */
|
217 |
-
$framework = new $frameworkClass(null, $this->composer, $this->getIO());
|
218 |
-
$locations = array_keys($framework->getLocations());
|
219 |
-
$pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
|
220 |
-
}
|
221 |
-
|
222 |
-
return $pattern ? : '(\w+)';
|
223 |
-
}
|
224 |
-
|
225 |
-
/**
|
226 |
-
* Get I/O object
|
227 |
-
*
|
228 |
-
* @return IOInterface
|
229 |
-
*/
|
230 |
-
private function getIO()
|
231 |
-
{
|
232 |
-
return $this->io;
|
233 |
-
}
|
234 |
-
|
235 |
-
/**
|
236 |
-
* Look for installers set to be disabled in composer's extra config and
|
237 |
-
* remove them from the list of supported installers.
|
238 |
-
*
|
239 |
-
* Globals:
|
240 |
-
* - true, "all", and "*" - disable all installers.
|
241 |
-
* - false - enable all installers (useful with
|
242 |
-
* wikimedia/composer-merge-plugin or similar)
|
243 |
-
*
|
244 |
-
* @return void
|
245 |
-
*/
|
246 |
-
protected function removeDisabledInstallers()
|
247 |
-
{
|
248 |
-
$extra = $this->composer->getPackage()->getExtra();
|
249 |
-
|
250 |
-
if (!isset($extra['installer-disable']) || $extra['installer-disable'] === false) {
|
251 |
-
// No installers are disabled
|
252 |
-
return;
|
253 |
-
}
|
254 |
-
|
255 |
-
// Get installers to disable
|
256 |
-
$disable = $extra['installer-disable'];
|
257 |
-
|
258 |
-
// Ensure $disabled is an array
|
259 |
-
if (!is_array($disable)) {
|
260 |
-
$disable = array($disable);
|
261 |
-
}
|
262 |
-
|
263 |
-
// Check which installers should be disabled
|
264 |
-
$all = array(true, "all", "*");
|
265 |
-
$intersect = array_intersect($all, $disable);
|
266 |
-
if (!empty($intersect)) {
|
267 |
-
// Disable all installers
|
268 |
-
$this->supportedTypes = array();
|
269 |
-
} else {
|
270 |
-
// Disable specified installers
|
271 |
-
foreach ($disable as $key => $installer) {
|
272 |
-
if (is_string($installer) && key_exists($installer, $this->supportedTypes)) {
|
273 |
-
unset($this->supportedTypes[$installer]);
|
274 |
-
}
|
275 |
-
}
|
276 |
-
}
|
277 |
-
}
|
278 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/ItopInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class ItopInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'extension' => 'extensions/{$name}/',
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class JoomlaInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'component' => 'components/{$name}/',
|
8 |
-
'module' => 'modules/{$name}/',
|
9 |
-
'template' => 'templates/{$name}/',
|
10 |
-
'plugin' => 'plugins/{$name}/',
|
11 |
-
'library' => 'libraries/{$name}/',
|
12 |
-
);
|
13 |
-
|
14 |
-
// TODO: Add inflector for mod_ and com_ names
|
15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
/**
|
5 |
-
*
|
6 |
-
* Installer for kanboard plugins
|
7 |
-
*
|
8 |
-
* kanboard.net
|
9 |
-
*
|
10 |
-
* Class KanboardInstaller
|
11 |
-
* @package Composer\Installers
|
12 |
-
*/
|
13 |
-
class KanboardInstaller extends BaseInstaller
|
14 |
-
{
|
15 |
-
protected $locations = array(
|
16 |
-
'plugin' => 'plugins/{$name}/',
|
17 |
-
);
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class KirbyInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => 'site/plugins/{$name}/',
|
8 |
-
'field' => 'site/fields/{$name}/',
|
9 |
-
'tag' => 'site/tags/{$name}/'
|
10 |
-
);
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/KnownInstaller.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class KnownInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => 'IdnoPlugins/{$name}/',
|
8 |
-
'theme' => 'Themes/{$name}/',
|
9 |
-
'console' => 'ConsolePlugins/{$name}/',
|
10 |
-
);
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class KodiCMSInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => 'cms/plugins/{$name}/',
|
8 |
-
'media' => 'cms/media/vendor/{$name}/'
|
9 |
-
);
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class KohanaInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'modules/{$name}/',
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Composer\Installers;
|
4 |
-
|
5 |
-
class LanManagementSystemInstaller extends BaseInstaller
|
6 |
-
{
|
7 |
-
|
8 |
-
protected $locations = array(
|
9 |
-
'plugin' => 'plugins/{$name}/',
|
10 |
-
'template' => 'templates/{$name}/',
|
11 |
-
'document-template' => 'documents/templates/{$name}/',
|
12 |
-
'userpanel-module' => 'userpanel/modules/{$name}/',
|
13 |
-
);
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Format package name to CamelCase
|
17 |
-
*/
|
18 |
-
public function inflectPackageVars($vars)
|
19 |
-
{
|
20 |
-
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
21 |
-
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
22 |
-
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
23 |
-
|
24 |
-
return $vars;
|
25 |
-
}
|
26 |
-
|
27 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class LaravelInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'library' => 'libraries/{$name}/',
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class LavaLiteInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'package' => 'packages/{$vendor}/{$name}/',
|
8 |
-
'theme' => 'public/themes/{$name}/',
|
9 |
-
);
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class LithiumInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'library' => 'libraries/{$name}/',
|
8 |
-
'source' => 'libraries/_source/{$name}/',
|
9 |
-
);
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class MODULEWorkInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'modules/{$name}/',
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
/**
|
5 |
-
* An installer to handle MODX Evolution specifics when installing packages.
|
6 |
-
*/
|
7 |
-
class MODXEvoInstaller extends BaseInstaller
|
8 |
-
{
|
9 |
-
protected $locations = array(
|
10 |
-
'snippet' => 'assets/snippets/{$name}/',
|
11 |
-
'plugin' => 'assets/plugins/{$name}/',
|
12 |
-
'module' => 'assets/modules/{$name}/',
|
13 |
-
'template' => 'assets/templates/{$name}/',
|
14 |
-
'lib' => 'assets/lib/{$name}/'
|
15 |
-
);
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class MagentoInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'theme' => 'app/design/frontend/{$name}/',
|
8 |
-
'skin' => 'skin/frontend/default/{$name}/',
|
9 |
-
'library' => 'lib/{$name}/',
|
10 |
-
);
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Plugin/theme installer for majima
|
6 |
-
* @author David Neustadt
|
7 |
-
*/
|
8 |
-
class MajimaInstaller extends BaseInstaller
|
9 |
-
{
|
10 |
-
protected $locations = array(
|
11 |
-
'plugin' => 'plugins/{$name}/',
|
12 |
-
);
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Transforms the names
|
16 |
-
* @param array $vars
|
17 |
-
* @return array
|
18 |
-
*/
|
19 |
-
public function inflectPackageVars($vars)
|
20 |
-
{
|
21 |
-
return $this->correctPluginName($vars);
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Change hyphenated names to camelcase
|
26 |
-
* @param array $vars
|
27 |
-
* @return array
|
28 |
-
*/
|
29 |
-
private function correctPluginName($vars)
|
30 |
-
{
|
31 |
-
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
32 |
-
return strtoupper($matches[0][1]);
|
33 |
-
}, $vars['name']);
|
34 |
-
$vars['name'] = ucfirst($camelCasedName);
|
35 |
-
return $vars;
|
36 |
-
}
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/MakoInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class MakoInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'package' => 'app/packages/{$name}/',
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/MauticInstaller.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class MauticInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => 'plugins/{$name}/',
|
8 |
-
'theme' => 'themes/{$name}/',
|
9 |
-
);
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Format package name of mautic-plugins to CamelCase
|
13 |
-
*/
|
14 |
-
public function inflectPackageVars($vars)
|
15 |
-
{
|
16 |
-
if ($vars['type'] == 'mautic-plugin') {
|
17 |
-
$vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
18 |
-
return strtoupper($matches[0][1]);
|
19 |
-
}, ucfirst($vars['name']));
|
20 |
-
}
|
21 |
-
|
22 |
-
return $vars;
|
23 |
-
}
|
24 |
-
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/MayaInstaller.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class MayaInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'modules/{$name}/',
|
8 |
-
);
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Format package name.
|
12 |
-
*
|
13 |
-
* For package type maya-module, cut off a trailing '-module' if present.
|
14 |
-
*
|
15 |
-
*/
|
16 |
-
public function inflectPackageVars($vars)
|
17 |
-
{
|
18 |
-
if ($vars['type'] === 'maya-module') {
|
19 |
-
return $this->inflectModuleVars($vars);
|
20 |
-
}
|
21 |
-
|
22 |
-
return $vars;
|
23 |
-
}
|
24 |
-
|
25 |
-
protected function inflectModuleVars($vars)
|
26 |
-
{
|
27 |
-
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
|
28 |
-
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
29 |
-
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
30 |
-
|
31 |
-
return $vars;
|
32 |
-
}
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php
DELETED
@@ -1,51 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class MediaWikiInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'core' => 'core/',
|
8 |
-
'extension' => 'extensions/{$name}/',
|
9 |
-
'skin' => 'skins/{$name}/',
|
10 |
-
);
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Format package name.
|
14 |
-
*
|
15 |
-
* For package type mediawiki-extension, cut off a trailing '-extension' if present and transform
|
16 |
-
* to CamelCase keeping existing uppercase chars.
|
17 |
-
*
|
18 |
-
* For package type mediawiki-skin, cut off a trailing '-skin' if present.
|
19 |
-
*
|
20 |
-
*/
|
21 |
-
public function inflectPackageVars($vars)
|
22 |
-
{
|
23 |
-
|
24 |
-
if ($vars['type'] === 'mediawiki-extension') {
|
25 |
-
return $this->inflectExtensionVars($vars);
|
26 |
-
}
|
27 |
-
|
28 |
-
if ($vars['type'] === 'mediawiki-skin') {
|
29 |
-
return $this->inflectSkinVars($vars);
|
30 |
-
}
|
31 |
-
|
32 |
-
return $vars;
|
33 |
-
}
|
34 |
-
|
35 |
-
protected function inflectExtensionVars($vars)
|
36 |
-
{
|
37 |
-
$vars['name'] = preg_replace('/-extension$/', '', $vars['name']);
|
38 |
-
$vars['name'] = str_replace('-', ' ', $vars['name']);
|
39 |
-
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
40 |
-
|
41 |
-
return $vars;
|
42 |
-
}
|
43 |
-
|
44 |
-
protected function inflectSkinVars($vars)
|
45 |
-
{
|
46 |
-
$vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
|
47 |
-
|
48 |
-
return $vars;
|
49 |
-
}
|
50 |
-
|
51 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php
DELETED
@@ -1,119 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class MicroweberInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'userfiles/modules/{$install_item_dir}/',
|
8 |
-
'module-skin' => 'userfiles/modules/{$install_item_dir}/templates/',
|
9 |
-
'template' => 'userfiles/templates/{$install_item_dir}/',
|
10 |
-
'element' => 'userfiles/elements/{$install_item_dir}/',
|
11 |
-
'vendor' => 'vendor/{$install_item_dir}/',
|
12 |
-
'components' => 'components/{$install_item_dir}/'
|
13 |
-
);
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Format package name.
|
17 |
-
*
|
18 |
-
* For package type microweber-module, cut off a trailing '-module' if present
|
19 |
-
*
|
20 |
-
* For package type microweber-template, cut off a trailing '-template' if present.
|
21 |
-
*
|
22 |
-
*/
|
23 |
-
public function inflectPackageVars($vars)
|
24 |
-
{
|
25 |
-
|
26 |
-
|
27 |
-
if ($this->package->getTargetDir()) {
|
28 |
-
$vars['install_item_dir'] = $this->package->getTargetDir();
|
29 |
-
} else {
|
30 |
-
$vars['install_item_dir'] = $vars['name'];
|
31 |
-
if ($vars['type'] === 'microweber-template') {
|
32 |
-
return $this->inflectTemplateVars($vars);
|
33 |
-
}
|
34 |
-
if ($vars['type'] === 'microweber-templates') {
|
35 |
-
return $this->inflectTemplatesVars($vars);
|
36 |
-
}
|
37 |
-
if ($vars['type'] === 'microweber-core') {
|
38 |
-
return $this->inflectCoreVars($vars);
|
39 |
-
}
|
40 |
-
if ($vars['type'] === 'microweber-adapter') {
|
41 |
-
return $this->inflectCoreVars($vars);
|
42 |
-
}
|
43 |
-
if ($vars['type'] === 'microweber-module') {
|
44 |
-
return $this->inflectModuleVars($vars);
|
45 |
-
}
|
46 |
-
if ($vars['type'] === 'microweber-modules') {
|
47 |
-
return $this->inflectModulesVars($vars);
|
48 |
-
}
|
49 |
-
if ($vars['type'] === 'microweber-skin') {
|
50 |
-
return $this->inflectSkinVars($vars);
|
51 |
-
}
|
52 |
-
if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
|
53 |
-
return $this->inflectElementVars($vars);
|
54 |
-
}
|
55 |
-
}
|
56 |
-
|
57 |
-
|
58 |
-
return $vars;
|
59 |
-
}
|
60 |
-
|
61 |
-
protected function inflectTemplateVars($vars)
|
62 |
-
{
|
63 |
-
$vars['install_item_dir'] = preg_replace('/-template$/', '', $vars['install_item_dir']);
|
64 |
-
$vars['install_item_dir'] = preg_replace('/template-$/', '', $vars['install_item_dir']);
|
65 |
-
|
66 |
-
return $vars;
|
67 |
-
}
|
68 |
-
|
69 |
-
protected function inflectTemplatesVars($vars)
|
70 |
-
{
|
71 |
-
$vars['install_item_dir'] = preg_replace('/-templates$/', '', $vars['install_item_dir']);
|
72 |
-
$vars['install_item_dir'] = preg_replace('/templates-$/', '', $vars['install_item_dir']);
|
73 |
-
|
74 |
-
return $vars;
|
75 |
-
}
|
76 |
-
|
77 |
-
protected function inflectCoreVars($vars)
|
78 |
-
{
|
79 |
-
$vars['install_item_dir'] = preg_replace('/-providers$/', '', $vars['install_item_dir']);
|
80 |
-
$vars['install_item_dir'] = preg_replace('/-provider$/', '', $vars['install_item_dir']);
|
81 |
-
$vars['install_item_dir'] = preg_replace('/-adapter$/', '', $vars['install_item_dir']);
|
82 |
-
|
83 |
-
return $vars;
|
84 |
-
}
|
85 |
-
|
86 |
-
protected function inflectModuleVars($vars)
|
87 |
-
{
|
88 |
-
$vars['install_item_dir'] = preg_replace('/-module$/', '', $vars['install_item_dir']);
|
89 |
-
$vars['install_item_dir'] = preg_replace('/module-$/', '', $vars['install_item_dir']);
|
90 |
-
|
91 |
-
return $vars;
|
92 |
-
}
|
93 |
-
|
94 |
-
protected function inflectModulesVars($vars)
|
95 |
-
{
|
96 |
-
$vars['install_item_dir'] = preg_replace('/-modules$/', '', $vars['install_item_dir']);
|
97 |
-
$vars['install_item_dir'] = preg_replace('/modules-$/', '', $vars['install_item_dir']);
|
98 |
-
|
99 |
-
return $vars;
|
100 |
-
}
|
101 |
-
|
102 |
-
protected function inflectSkinVars($vars)
|
103 |
-
{
|
104 |
-
$vars['install_item_dir'] = preg_replace('/-skin$/', '', $vars['install_item_dir']);
|
105 |
-
$vars['install_item_dir'] = preg_replace('/skin-$/', '', $vars['install_item_dir']);
|
106 |
-
|
107 |
-
return $vars;
|
108 |
-
}
|
109 |
-
|
110 |
-
protected function inflectElementVars($vars)
|
111 |
-
{
|
112 |
-
$vars['install_item_dir'] = preg_replace('/-elements$/', '', $vars['install_item_dir']);
|
113 |
-
$vars['install_item_dir'] = preg_replace('/elements-$/', '', $vars['install_item_dir']);
|
114 |
-
$vars['install_item_dir'] = preg_replace('/-element$/', '', $vars['install_item_dir']);
|
115 |
-
$vars['install_item_dir'] = preg_replace('/element-$/', '', $vars['install_item_dir']);
|
116 |
-
|
117 |
-
return $vars;
|
118 |
-
}
|
119 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/ModxInstaller.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
/**
|
5 |
-
* An installer to handle MODX specifics when installing packages.
|
6 |
-
*/
|
7 |
-
class ModxInstaller extends BaseInstaller
|
8 |
-
{
|
9 |
-
protected $locations = array(
|
10 |
-
'extra' => 'core/packages/{$name}/'
|
11 |
-
);
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class MoodleInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'mod' => 'mod/{$name}/',
|
8 |
-
'admin_report' => 'admin/report/{$name}/',
|
9 |
-
'atto' => 'lib/editor/atto/plugins/{$name}/',
|
10 |
-
'tool' => 'admin/tool/{$name}/',
|
11 |
-
'assignment' => 'mod/assignment/type/{$name}/',
|
12 |
-
'assignsubmission' => 'mod/assign/submission/{$name}/',
|
13 |
-
'assignfeedback' => 'mod/assign/feedback/{$name}/',
|
14 |
-
'auth' => 'auth/{$name}/',
|
15 |
-
'availability' => 'availability/condition/{$name}/',
|
16 |
-
'block' => 'blocks/{$name}/',
|
17 |
-
'booktool' => 'mod/book/tool/{$name}/',
|
18 |
-
'cachestore' => 'cache/stores/{$name}/',
|
19 |
-
'cachelock' => 'cache/locks/{$name}/',
|
20 |
-
'calendartype' => 'calendar/type/{$name}/',
|
21 |
-
'format' => 'course/format/{$name}/',
|
22 |
-
'coursereport' => 'course/report/{$name}/',
|
23 |
-
'customcertelement' => 'mod/customcert/element/{$name}/',
|
24 |
-
'datafield' => 'mod/data/field/{$name}/',
|
25 |
-
'datapreset' => 'mod/data/preset/{$name}/',
|
26 |
-
'editor' => 'lib/editor/{$name}/',
|
27 |
-
'enrol' => 'enrol/{$name}/',
|
28 |
-
'filter' => 'filter/{$name}/',
|
29 |
-
'gradeexport' => 'grade/export/{$name}/',
|
30 |
-
'gradeimport' => 'grade/import/{$name}/',
|
31 |
-
'gradereport' => 'grade/report/{$name}/',
|
32 |
-
'gradingform' => 'grade/grading/form/{$name}/',
|
33 |
-
'local' => 'local/{$name}/',
|
34 |
-
'logstore' => 'admin/tool/log/store/{$name}/',
|
35 |
-
'ltisource' => 'mod/lti/source/{$name}/',
|
36 |
-
'ltiservice' => 'mod/lti/service/{$name}/',
|
37 |
-
'message' => 'message/output/{$name}/',
|
38 |
-
'mnetservice' => 'mnet/service/{$name}/',
|
39 |
-
'plagiarism' => 'plagiarism/{$name}/',
|
40 |
-
'portfolio' => 'portfolio/{$name}/',
|
41 |
-
'qbehaviour' => 'question/behaviour/{$name}/',
|
42 |
-
'qformat' => 'question/format/{$name}/',
|
43 |
-
'qtype' => 'question/type/{$name}/',
|
44 |
-
'quizaccess' => 'mod/quiz/accessrule/{$name}/',
|
45 |
-
'quiz' => 'mod/quiz/report/{$name}/',
|
46 |
-
'report' => 'report/{$name}/',
|
47 |
-
'repository' => 'repository/{$name}/',
|
48 |
-
'scormreport' => 'mod/scorm/report/{$name}/',
|
49 |
-
'search' => 'search/engine/{$name}/',
|
50 |
-
'theme' => 'theme/{$name}/',
|
51 |
-
'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
|
52 |
-
'profilefield' => 'user/profile/field/{$name}/',
|
53 |
-
'webservice' => 'webservice/{$name}/',
|
54 |
-
'workshopallocation' => 'mod/workshop/allocation/{$name}/',
|
55 |
-
'workshopeval' => 'mod/workshop/eval/{$name}/',
|
56 |
-
'workshopform' => 'mod/workshop/form/{$name}/'
|
57 |
-
);
|
58 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class OctoberInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'modules/{$name}/',
|
8 |
-
'plugin' => 'plugins/{$vendor}/{$name}/',
|
9 |
-
'theme' => 'themes/{$name}/'
|
10 |
-
);
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Format package name.
|
14 |
-
*
|
15 |
-
* For package type october-plugin, cut off a trailing '-plugin' if present.
|
16 |
-
*
|
17 |
-
* For package type october-theme, cut off a trailing '-theme' if present.
|
18 |
-
*
|
19 |
-
*/
|
20 |
-
public function inflectPackageVars($vars)
|
21 |
-
{
|
22 |
-
if ($vars['type'] === 'october-plugin') {
|
23 |
-
return $this->inflectPluginVars($vars);
|
24 |
-
}
|
25 |
-
|
26 |
-
if ($vars['type'] === 'october-theme') {
|
27 |
-
return $this->inflectThemeVars($vars);
|
28 |
-
}
|
29 |
-
|
30 |
-
return $vars;
|
31 |
-
}
|
32 |
-
|
33 |
-
protected function inflectPluginVars($vars)
|
34 |
-
{
|
35 |
-
$vars['name'] = preg_replace('/^oc-|-plugin$/', '', $vars['name']);
|
36 |
-
$vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
|
37 |
-
|
38 |
-
return $vars;
|
39 |
-
}
|
40 |
-
|
41 |
-
protected function inflectThemeVars($vars)
|
42 |
-
{
|
43 |
-
$vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']);
|
44 |
-
|
45 |
-
return $vars;
|
46 |
-
}
|
47 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class OntoWikiInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'extension' => 'extensions/{$name}/',
|
8 |
-
'theme' => 'extensions/themes/{$name}/',
|
9 |
-
'translation' => 'extensions/translations/{$name}/',
|
10 |
-
);
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Format package name to lower case and remove ".ontowiki" suffix
|
14 |
-
*/
|
15 |
-
public function inflectPackageVars($vars)
|
16 |
-
{
|
17 |
-
$vars['name'] = strtolower($vars['name']);
|
18 |
-
$vars['name'] = preg_replace('/.ontowiki$/', '', $vars['name']);
|
19 |
-
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
20 |
-
$vars['name'] = preg_replace('/-translation$/', '', $vars['name']);
|
21 |
-
|
22 |
-
return $vars;
|
23 |
-
}
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
|
5 |
-
class OsclassInstaller extends BaseInstaller
|
6 |
-
{
|
7 |
-
|
8 |
-
protected $locations = array(
|
9 |
-
'plugin' => 'oc-content/plugins/{$name}/',
|
10 |
-
'theme' => 'oc-content/themes/{$name}/',
|
11 |
-
'language' => 'oc-content/languages/{$name}/',
|
12 |
-
);
|
13 |
-
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/OxidInstaller.php
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
use Composer\Package\PackageInterface;
|
5 |
-
|
6 |
-
class OxidInstaller extends BaseInstaller
|
7 |
-
{
|
8 |
-
const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/';
|
9 |
-
|
10 |
-
protected $locations = array(
|
11 |
-
'module' => 'modules/{$name}/',
|
12 |
-
'theme' => 'application/views/{$name}/',
|
13 |
-
'out' => 'out/{$name}/',
|
14 |
-
);
|
15 |
-
|
16 |
-
/**
|
17 |
-
* getInstallPath
|
18 |
-
*
|
19 |
-
* @param PackageInterface $package
|
20 |
-
* @param string $frameworkType
|
21 |
-
* @return void
|
22 |
-
*/
|
23 |
-
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
24 |
-
{
|
25 |
-
$installPath = parent::getInstallPath($package, $frameworkType);
|
26 |
-
$type = $this->package->getType();
|
27 |
-
if ($type === 'oxid-module') {
|
28 |
-
$this->prepareVendorDirectory($installPath);
|
29 |
-
}
|
30 |
-
return $installPath;
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* prepareVendorDirectory
|
35 |
-
*
|
36 |
-
* Makes sure there is a vendormetadata.php file inside
|
37 |
-
* the vendor folder if there is a vendor folder.
|
38 |
-
*
|
39 |
-
* @param string $installPath
|
40 |
-
* @return void
|
41 |
-
*/
|
42 |
-
protected function prepareVendorDirectory($installPath)
|
43 |
-
{
|
44 |
-
$matches = '';
|
45 |
-
$hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
|
46 |
-
if (!$hasVendorDirectory) {
|
47 |
-
return;
|
48 |
-
}
|
49 |
-
|
50 |
-
$vendorDirectory = $matches['vendor'];
|
51 |
-
$vendorPath = getcwd() . '/modules/' . $vendorDirectory;
|
52 |
-
if (!file_exists($vendorPath)) {
|
53 |
-
mkdir($vendorPath, 0755, true);
|
54 |
-
}
|
55 |
-
|
56 |
-
$vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
|
57 |
-
touch($vendorMetaDataPath);
|
58 |
-
}
|
59 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/PPIInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class PPIInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'modules/{$name}/',
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class PhiftyInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'bundle' => 'bundles/{$name}/',
|
8 |
-
'library' => 'libraries/{$name}/',
|
9 |
-
'framework' => 'frameworks/{$name}/',
|
10 |
-
);
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class PhpBBInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'extension' => 'ext/{$vendor}/{$name}/',
|
8 |
-
'language' => 'language/{$name}/',
|
9 |
-
'style' => 'styles/{$name}/',
|
10 |
-
);
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class PimcoreInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => 'plugins/{$name}/',
|
8 |
-
);
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Format package name to CamelCase
|
12 |
-
*/
|
13 |
-
public function inflectPackageVars($vars)
|
14 |
-
{
|
15 |
-
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
16 |
-
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
17 |
-
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
18 |
-
|
19 |
-
return $vars;
|
20 |
-
}
|
21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Class PiwikInstaller
|
6 |
-
*
|
7 |
-
* @package Composer\Installers
|
8 |
-
*/
|
9 |
-
class PiwikInstaller extends BaseInstaller
|
10 |
-
{
|
11 |
-
/**
|
12 |
-
* @var array
|
13 |
-
*/
|
14 |
-
protected $locations = array(
|
15 |
-
'plugin' => 'plugins/{$name}/',
|
16 |
-
);
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Format package name to CamelCase
|
20 |
-
* @param array $vars
|
21 |
-
*
|
22 |
-
* @return array
|
23 |
-
*/
|
24 |
-
public function inflectPackageVars($vars)
|
25 |
-
{
|
26 |
-
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
27 |
-
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
28 |
-
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
29 |
-
|
30 |
-
return $vars;
|
31 |
-
}
|
32 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class PlentymarketsInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => '{$name}/'
|
8 |
-
);
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Remove hyphen, "plugin" and format to camelcase
|
12 |
-
* @param array $vars
|
13 |
-
*
|
14 |
-
* @return array
|
15 |
-
*/
|
16 |
-
public function inflectPackageVars($vars)
|
17 |
-
{
|
18 |
-
$vars['name'] = explode("-", $vars['name']);
|
19 |
-
foreach ($vars['name'] as $key => $name) {
|
20 |
-
$vars['name'][$key] = ucfirst($vars['name'][$key]);
|
21 |
-
if (strcasecmp($name, "Plugin") == 0) {
|
22 |
-
unset($vars['name'][$key]);
|
23 |
-
}
|
24 |
-
}
|
25 |
-
$vars['name'] = implode("",$vars['name']);
|
26 |
-
|
27 |
-
return $vars;
|
28 |
-
}
|
29 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/Plugin.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Composer\Installers;
|
4 |
-
|
5 |
-
use Composer\Composer;
|
6 |
-
use Composer\IO\IOInterface;
|
7 |
-
use Composer\Plugin\PluginInterface;
|
8 |
-
|
9 |
-
class Plugin implements PluginInterface
|
10 |
-
{
|
11 |
-
|
12 |
-
public function activate(Composer $composer, IOInterface $io)
|
13 |
-
{
|
14 |
-
$installer = new Installer($io, $composer);
|
15 |
-
$composer->getInstallationManager()->addInstaller($installer);
|
16 |
-
}
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/PortoInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class PortoInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'container' => 'app/Containers/{$name}/',
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class PrestashopInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'modules/{$name}/',
|
8 |
-
'theme' => 'themes/{$name}/',
|
9 |
-
);
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Composer\Installers;
|
4 |
-
|
5 |
-
class PuppetInstaller extends BaseInstaller
|
6 |
-
{
|
7 |
-
|
8 |
-
protected $locations = array(
|
9 |
-
'module' => 'modules/{$name}/',
|
10 |
-
);
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php
DELETED
@@ -1,63 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class PxcmsInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'app/Modules/{$name}/',
|
8 |
-
'theme' => 'themes/{$name}/',
|
9 |
-
);
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Format package name.
|
13 |
-
*
|
14 |
-
* @param array $vars
|
15 |
-
*
|
16 |
-
* @return array
|
17 |
-
*/
|
18 |
-
public function inflectPackageVars($vars)
|
19 |
-
{
|
20 |
-
if ($vars['type'] === 'pxcms-module') {
|
21 |
-
return $this->inflectModuleVars($vars);
|
22 |
-
}
|
23 |
-
|
24 |
-
if ($vars['type'] === 'pxcms-theme') {
|
25 |
-
return $this->inflectThemeVars($vars);
|
26 |
-
}
|
27 |
-
|
28 |
-
return $vars;
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* For package type pxcms-module, cut off a trailing '-plugin' if present.
|
33 |
-
*
|
34 |
-
* return string
|
35 |
-
*/
|
36 |
-
protected function inflectModuleVars($vars)
|
37 |
-
{
|
38 |
-
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
|
39 |
-
$vars['name'] = str_replace('module-', '', $vars['name']); // strip out module-
|
40 |
-
$vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module
|
41 |
-
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
|
42 |
-
$vars['name'] = ucwords($vars['name']); // make module name camelcased
|
43 |
-
|
44 |
-
return $vars;
|
45 |
-
}
|
46 |
-
|
47 |
-
|
48 |
-
/**
|
49 |
-
* For package type pxcms-module, cut off a trailing '-plugin' if present.
|
50 |
-
*
|
51 |
-
* return string
|
52 |
-
*/
|
53 |
-
protected function inflectThemeVars($vars)
|
54 |
-
{
|
55 |
-
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
|
56 |
-
$vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme-
|
57 |
-
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme
|
58 |
-
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
|
59 |
-
$vars['name'] = ucwords($vars['name']); // make module name camelcased
|
60 |
-
|
61 |
-
return $vars;
|
62 |
-
}
|
63 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class RadPHPInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'bundle' => 'src/{$name}/'
|
8 |
-
);
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Format package name to CamelCase
|
12 |
-
*/
|
13 |
-
public function inflectPackageVars($vars)
|
14 |
-
{
|
15 |
-
$nameParts = explode('/', $vars['name']);
|
16 |
-
foreach ($nameParts as &$value) {
|
17 |
-
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
|
18 |
-
$value = str_replace(array('-', '_'), ' ', $value);
|
19 |
-
$value = str_replace(' ', '', ucwords($value));
|
20 |
-
}
|
21 |
-
$vars['name'] = implode('/', $nameParts);
|
22 |
-
return $vars;
|
23 |
-
}
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class ReIndexInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'theme' => 'themes/{$name}/',
|
8 |
-
'plugin' => 'plugins/{$name}/'
|
9 |
-
);
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class Redaxo5Installer extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'addon' => 'redaxo/src/addons/{$name}/',
|
8 |
-
'bestyle-plugin' => 'redaxo/src/addons/be_style/plugins/{$name}/'
|
9 |
-
);
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class RedaxoInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'addon' => 'redaxo/include/addons/{$name}/',
|
8 |
-
'bestyle-plugin' => 'redaxo/include/addons/be_style/plugins/{$name}/'
|
9 |
-
);
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class RoundcubeInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => 'plugins/{$name}/',
|
8 |
-
);
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Lowercase name and changes the name to a underscores
|
12 |
-
*
|
13 |
-
* @param array $vars
|
14 |
-
* @return array
|
15 |
-
*/
|
16 |
-
public function inflectPackageVars($vars)
|
17 |
-
{
|
18 |
-
$vars['name'] = strtolower(str_replace('-', '_', $vars['name']));
|
19 |
-
|
20 |
-
return $vars;
|
21 |
-
}
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/SMFInstaller.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class SMFInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'Sources/{$name}/',
|
8 |
-
'theme' => 'Themes/{$name}/',
|
9 |
-
);
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
DELETED
@@ -1,60 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Plugin/theme installer for shopware
|
6 |
-
* @author Benjamin Boit
|
7 |
-
*/
|
8 |
-
class ShopwareInstaller extends BaseInstaller
|
9 |
-
{
|
10 |
-
protected $locations = array(
|
11 |
-
'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
|
12 |
-
'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
|
13 |
-
'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/',
|
14 |
-
'theme' => 'templates/{$name}/',
|
15 |
-
'plugin' => 'custom/plugins/{$name}/',
|
16 |
-
'frontend-theme' => 'themes/Frontend/{$name}/',
|
17 |
-
);
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Transforms the names
|
21 |
-
* @param array $vars
|
22 |
-
* @return array
|
23 |
-
*/
|
24 |
-
public function inflectPackageVars($vars)
|
25 |
-
{
|
26 |
-
if ($vars['type'] === 'shopware-theme') {
|
27 |
-
return $this->correctThemeName($vars);
|
28 |
-
}
|
29 |
-
|
30 |
-
return $this->correctPluginName($vars);
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Changes the name to a camelcased combination of vendor and name
|
35 |
-
* @param array $vars
|
36 |
-
* @return array
|
37 |
-
*/
|
38 |
-
private function correctPluginName($vars)
|
39 |
-
{
|
40 |
-
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
41 |
-
return strtoupper($matches[0][1]);
|
42 |
-
}, $vars['name']);
|
43 |
-
|
44 |
-
$vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName);
|
45 |
-
|
46 |
-
return $vars;
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Changes the name to a underscore separated name
|
51 |
-
* @param array $vars
|
52 |
-
* @return array
|
53 |
-
*/
|
54 |
-
private function correctThemeName($vars)
|
55 |
-
{
|
56 |
-
$vars['name'] = str_replace('-', '_', $vars['name']);
|
57 |
-
|
58 |
-
return $vars;
|
59 |
-
}
|
60 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
use Composer\Package\PackageInterface;
|
5 |
-
|
6 |
-
class SilverStripeInstaller extends BaseInstaller
|
7 |
-
{
|
8 |
-
protected $locations = array(
|
9 |
-
'module' => '{$name}/',
|
10 |
-
'theme' => 'themes/{$name}/',
|
11 |
-
);
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Return the install path based on package type.
|
15 |
-
*
|
16 |
-
* Relies on built-in BaseInstaller behaviour with one exception: silverstripe/framework
|
17 |
-
* must be installed to 'sapphire' and not 'framework' if the version is <3.0.0
|
18 |
-
*
|
19 |
-
* @param PackageInterface $package
|
20 |
-
* @param string $frameworkType
|
21 |
-
* @return string
|
22 |
-
*/
|
23 |
-
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
24 |
-
{
|
25 |
-
if (
|
26 |
-
$package->getName() == 'silverstripe/framework'
|
27 |
-
&& preg_match('/^\d+\.\d+\.\d+/', $package->getVersion())
|
28 |
-
&& version_compare($package->getVersion(), '2.999.999') < 0
|
29 |
-
) {
|
30 |
-
return $this->templatePath($this->locations['module'], array('name' => 'sapphire'));
|
31 |
-
}
|
32 |
-
|
33 |
-
return parent::getInstallPath($package, $frameworkType);
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Composer\Installers;
|
4 |
-
|
5 |
-
class SiteDirectInstaller extends BaseInstaller
|
6 |
-
{
|
7 |
-
protected $locations = array(
|
8 |
-
'module' => 'modules/{$vendor}/{$name}/',
|
9 |
-
'plugin' => 'plugins/{$vendor}/{$name}/'
|
10 |
-
);
|
11 |
-
|
12 |
-
public function inflectPackageVars($vars)
|
13 |
-
{
|
14 |
-
return $this->parseVars($vars);
|
15 |
-
}
|
16 |
-
|
17 |
-
protected function parseVars($vars)
|
18 |
-
{
|
19 |
-
$vars['vendor'] = strtolower($vars['vendor']) == 'sitedirect' ? 'SiteDirect' : $vars['vendor'];
|
20 |
-
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
21 |
-
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
22 |
-
|
23 |
-
return $vars;
|
24 |
-
}
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class SyDESInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'app/modules/{$name}/',
|
8 |
-
'theme' => 'themes/{$name}/',
|
9 |
-
);
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Format module name.
|
13 |
-
*
|
14 |
-
* Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present.
|
15 |
-
*
|
16 |
-
* @param array @vars
|
17 |
-
*
|
18 |
-
* @return array
|
19 |
-
*/
|
20 |
-
public function inflectPackageVars($vars)
|
21 |
-
{
|
22 |
-
if ($vars['type'] == 'sydes-module') {
|
23 |
-
return $this->inflectModuleVars($vars);
|
24 |
-
}
|
25 |
-
|
26 |
-
if ($vars['type'] === 'sydes-theme') {
|
27 |
-
return $this->inflectThemeVars($vars);
|
28 |
-
}
|
29 |
-
|
30 |
-
return $vars;
|
31 |
-
}
|
32 |
-
|
33 |
-
public function inflectModuleVars($vars)
|
34 |
-
{
|
35 |
-
$vars['name'] = preg_replace('/(^sydes-|-module$)/i', '', $vars['name']);
|
36 |
-
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
37 |
-
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
38 |
-
|
39 |
-
return $vars;
|
40 |
-
}
|
41 |
-
|
42 |
-
protected function inflectThemeVars($vars)
|
43 |
-
{
|
44 |
-
$vars['name'] = preg_replace('/(^sydes-|-theme$)/', '', $vars['name']);
|
45 |
-
$vars['name'] = strtolower($vars['name']);
|
46 |
-
|
47 |
-
return $vars;
|
48 |
-
}
|
49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Plugin installer for symfony 1.x
|
6 |
-
*
|
7 |
-
* @author Jérôme Tamarelle <jerome@tamarelle.net>
|
8 |
-
*/
|
9 |
-
class Symfony1Installer extends BaseInstaller
|
10 |
-
{
|
11 |
-
protected $locations = array(
|
12 |
-
'plugin' => 'plugins/{$name}/',
|
13 |
-
);
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Format package name to CamelCase
|
17 |
-
*/
|
18 |
-
public function inflectPackageVars($vars)
|
19 |
-
{
|
20 |
-
$vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
21 |
-
return strtoupper($matches[0][1]);
|
22 |
-
}, $vars['name']);
|
23 |
-
|
24 |
-
return $vars;
|
25 |
-
}
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Extension installer for TYPO3 CMS
|
6 |
-
*
|
7 |
-
* @deprecated since 1.0.25, use https://packagist.org/packages/typo3/cms-composer-installers instead
|
8 |
-
*
|
9 |
-
* @author Sascha Egerer <sascha.egerer@dkd.de>
|
10 |
-
*/
|
11 |
-
class TYPO3CmsInstaller extends BaseInstaller
|
12 |
-
{
|
13 |
-
protected $locations = array(
|
14 |
-
'extension' => 'typo3conf/ext/{$name}/',
|
15 |
-
);
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
/**
|
5 |
-
* An installer to handle TYPO3 Flow specifics when installing packages.
|
6 |
-
*/
|
7 |
-
class TYPO3FlowInstaller extends BaseInstaller
|
8 |
-
{
|
9 |
-
protected $locations = array(
|
10 |
-
'package' => 'Packages/Application/{$name}/',
|
11 |
-
'framework' => 'Packages/Framework/{$name}/',
|
12 |
-
'plugin' => 'Packages/Plugins/{$name}/',
|
13 |
-
'site' => 'Packages/Sites/{$name}/',
|
14 |
-
'boilerplate' => 'Packages/Boilerplates/{$name}/',
|
15 |
-
'build' => 'Build/{$name}/',
|
16 |
-
);
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Modify the package name to be a TYPO3 Flow style key.
|
20 |
-
*
|
21 |
-
* @param array $vars
|
22 |
-
* @return array
|
23 |
-
*/
|
24 |
-
public function inflectPackageVars($vars)
|
25 |
-
{
|
26 |
-
$autoload = $this->package->getAutoload();
|
27 |
-
if (isset($autoload['psr-0']) && is_array($autoload['psr-0'])) {
|
28 |
-
$namespace = key($autoload['psr-0']);
|
29 |
-
$vars['name'] = str_replace('\\', '.', $namespace);
|
30 |
-
}
|
31 |
-
if (isset($autoload['psr-4']) && is_array($autoload['psr-4'])) {
|
32 |
-
$namespace = key($autoload['psr-4']);
|
33 |
-
$vars['name'] = rtrim(str_replace('\\', '.', $namespace), '.');
|
34 |
-
}
|
35 |
-
|
36 |
-
return $vars;
|
37 |
-
}
|
38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/TaoInstaller.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
/**
|
5 |
-
* An installer to handle TAO extensions.
|
6 |
-
*/
|
7 |
-
class TaoInstaller extends BaseInstaller
|
8 |
-
{
|
9 |
-
protected $locations = array(
|
10 |
-
'extension' => '{$name}'
|
11 |
-
);
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class TheliaInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'local/modules/{$name}/',
|
8 |
-
'frontoffice-template' => 'templates/frontOffice/{$name}/',
|
9 |
-
'backoffice-template' => 'templates/backOffice/{$name}/',
|
10 |
-
'email-template' => 'templates/email/{$name}/',
|
11 |
-
);
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/TuskInstaller.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
/**
|
4 |
-
* Composer installer for 3rd party Tusk utilities
|
5 |
-
* @author Drew Ewing <drew@phenocode.com>
|
6 |
-
*/
|
7 |
-
class TuskInstaller extends BaseInstaller
|
8 |
-
{
|
9 |
-
protected $locations = array(
|
10 |
-
'task' => '.tusk/tasks/{$name}/',
|
11 |
-
'command' => '.tusk/commands/{$name}/',
|
12 |
-
'asset' => 'assets/tusk/{$name}/',
|
13 |
-
);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class UserFrostingInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'sprinkle' => 'app/sprinkles/{$name}/',
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class VanillaInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => 'plugins/{$name}/',
|
8 |
-
'theme' => 'themes/{$name}/',
|
9 |
-
);
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class VgmcpInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'bundle' => 'src/{$vendor}/{$name}/',
|
8 |
-
'theme' => 'themes/{$name}/'
|
9 |
-
);
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Format package name.
|
13 |
-
*
|
14 |
-
* For package type vgmcp-bundle, cut off a trailing '-bundle' if present.
|
15 |
-
*
|
16 |
-
* For package type vgmcp-theme, cut off a trailing '-theme' if present.
|
17 |
-
*
|
18 |
-
*/
|
19 |
-
public function inflectPackageVars($vars)
|
20 |
-
{
|
21 |
-
if ($vars['type'] === 'vgmcp-bundle') {
|
22 |
-
return $this->inflectPluginVars($vars);
|
23 |
-
}
|
24 |
-
|
25 |
-
if ($vars['type'] === 'vgmcp-theme') {
|
26 |
-
return $this->inflectThemeVars($vars);
|
27 |
-
}
|
28 |
-
|
29 |
-
return $vars;
|
30 |
-
}
|
31 |
-
|
32 |
-
protected function inflectPluginVars($vars)
|
33 |
-
{
|
34 |
-
$vars['name'] = preg_replace('/-bundle$/', '', $vars['name']);
|
35 |
-
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
36 |
-
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
37 |
-
|
38 |
-
return $vars;
|
39 |
-
}
|
40 |
-
|
41 |
-
protected function inflectThemeVars($vars)
|
42 |
-
{
|
43 |
-
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
44 |
-
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
45 |
-
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
46 |
-
|
47 |
-
return $vars;
|
48 |
-
}
|
49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Composer\Installers;
|
4 |
-
|
5 |
-
class WHMCSInstaller extends BaseInstaller
|
6 |
-
{
|
7 |
-
protected $locations = array(
|
8 |
-
'addons' => 'modules/addons/{$vendor}_{$name}/',
|
9 |
-
'fraud' => 'modules/fraud/{$vendor}_{$name}/',
|
10 |
-
'gateways' => 'modules/gateways/{$vendor}_{$name}/',
|
11 |
-
'notifications' => 'modules/notifications/{$vendor}_{$name}/',
|
12 |
-
'registrars' => 'modules/registrars/{$vendor}_{$name}/',
|
13 |
-
'reports' => 'modules/reports/{$vendor}_{$name}/',
|
14 |
-
'security' => 'modules/security/{$vendor}_{$name}/',
|
15 |
-
'servers' => 'modules/servers/{$vendor}_{$name}/',
|
16 |
-
'social' => 'modules/social/{$vendor}_{$name}/',
|
17 |
-
'support' => 'modules/support/{$vendor}_{$name}/',
|
18 |
-
'templates' => 'templates/{$vendor}_{$name}/',
|
19 |
-
'includes' => 'includes/{$vendor}_{$name}/'
|
20 |
-
);
|
21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class WolfCMSInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => 'wolf/plugins/{$name}/',
|
8 |
-
);
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class WordPressInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'plugin' => 'wp-content/plugins/{$name}/',
|
8 |
-
'theme' => 'wp-content/themes/{$name}/',
|
9 |
-
'muplugin' => 'wp-content/mu-plugins/{$name}/',
|
10 |
-
'dropin' => 'wp-content/{$name}/',
|
11 |
-
);
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/YawikInstaller.php
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Created by PhpStorm.
|
4 |
-
* User: cbleek
|
5 |
-
* Date: 25.03.16
|
6 |
-
* Time: 20:55
|
7 |
-
*/
|
8 |
-
|
9 |
-
namespace Composer\Installers;
|
10 |
-
|
11 |
-
|
12 |
-
class YawikInstaller extends BaseInstaller
|
13 |
-
{
|
14 |
-
protected $locations = array(
|
15 |
-
'module' => 'module/{$name}/',
|
16 |
-
);
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Format package name to CamelCase
|
20 |
-
* @param array $vars
|
21 |
-
*
|
22 |
-
* @return array
|
23 |
-
*/
|
24 |
-
public function inflectPackageVars($vars)
|
25 |
-
{
|
26 |
-
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
27 |
-
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
28 |
-
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
29 |
-
|
30 |
-
return $vars;
|
31 |
-
}
|
32 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/ZendInstaller.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class ZendInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'library' => 'library/{$name}/',
|
8 |
-
'extra' => 'extras/library/{$name}/',
|
9 |
-
'module' => 'module/{$name}/',
|
10 |
-
);
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Composer\Installers;
|
3 |
-
|
4 |
-
class ZikulaInstaller extends BaseInstaller
|
5 |
-
{
|
6 |
-
protected $locations = array(
|
7 |
-
'module' => 'modules/{$vendor}-{$name}/',
|
8 |
-
'theme' => 'themes/{$vendor}-{$name}/'
|
9 |
-
);
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installers/src/bootstrap.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
function includeIfExists($file)
|
3 |
-
{
|
4 |
-
if (file_exists($file)) {
|
5 |
-
return include $file;
|
6 |
-
}
|
7 |
-
}
|
8 |
-
if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) {
|
9 |
-
die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
|
10 |
-
'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
|
11 |
-
'php composer.phar install'.PHP_EOL);
|
12 |
-
}
|
13 |
-
return $loader;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|