ComposerInstallersDokuWikiInstaller

The Simple Calendar Composer Installers DokuWikiInstaller class.

Defined (1)

The class is defined in the following location(s).

/vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php  
  1. class DokuWikiInstaller extends BaseInstaller 
  2. protected $locations = array( 
  3. 'plugin' => 'lib/plugins/{$name}/',  
  4. 'template' => 'lib/tpl/{$name}/',  
  5. ); 
  6.  
  7. /** 
  8. * Format package name. 
  9. * For package type dokuwiki-plugin, cut off a trailing '-plugin',  
  10. * or leading dokuwiki_ if present. 
  11. *  
  12. * For package type dokuwiki-template, cut off a trailing '-template' if present. 
  13. */ 
  14. public function inflectPackageVars($vars) 
  15.  
  16. if ($vars['type'] === 'dokuwiki-plugin') { 
  17. return $this->inflectPluginVars($vars); 
  18.  
  19. if ($vars['type'] === 'dokuwiki-template') { 
  20. return $this->inflectTemplateVars($vars); 
  21.  
  22. return $vars; 
  23.  
  24. protected function inflectPluginVars($vars) 
  25. $vars['name'] = preg_replace('/-plugin$/', '', $vars['name']); 
  26. $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']); 
  27.  
  28. return $vars; 
  29.  
  30. protected function inflectTemplateVars($vars) 
  31. $vars['name'] = preg_replace('/-template$/', '', $vars['name']); 
  32. $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']); 
  33.  
  34. return $vars; 
  35.