PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 1.10
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v1.10
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
imagify / vendor / composer / installers / src / Composer / Installers / DokuWikiInstaller.php

DokuWikiInstaller.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 1.10, at vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php

51 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 }
51