You are here

class DokuWikiInstaller in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php \Composer\Installers\DokuWikiInstaller

Hierarchy

Expanded class hierarchy of DokuWikiInstaller

1 file declares its use of DokuWikiInstaller
DokuWikiInstallerTest.php in vendor/composer/installers/tests/Composer/Installers/Test/DokuWikiInstallerTest.php

File

vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php, line 4

Namespace

Composer\Installers
View source
class DokuWikiInstaller extends BaseInstaller {
  protected $locations = array(
    'plugin' => 'lib/plugins/{$name}/',
    'template' => 'lib/tpl/{$name}/',
  );

  /**
   * Format package name.
   *
   * For package type dokuwiki-plugin, cut off a trailing '-plugin',
   * or leading dokuwiki_ if present.
   *
   * For package type dokuwiki-template, cut off a trailing '-template' if present.
   *
   */
  public function inflectPackageVars($vars) {
    if ($vars['type'] === 'dokuwiki-plugin') {
      return $this
        ->inflectPluginVars($vars);
    }
    if ($vars['type'] === 'dokuwiki-template') {
      return $this
        ->inflectTemplateVars($vars);
    }
    return $vars;
  }
  protected function inflectPluginVars($vars) {
    $vars['name'] = preg_replace('/-plugin$/', '', $vars['name']);
    $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
    return $vars;
  }
  protected function inflectTemplateVars($vars) {
    $vars['name'] = preg_replace('/-template$/', '', $vars['name']);
    $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
    return $vars;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BaseInstaller::$composer protected property
BaseInstaller::$package protected property
BaseInstaller::getInstallPath public function Return the install path based on package type. 1
BaseInstaller::getLocations public function Gets the installer's locations 1
BaseInstaller::mapCustomInstallPaths protected function Search through a passed paths array for a custom install path.
BaseInstaller::templatePath protected function Replace vars in a path
BaseInstaller::__construct public function Initializes base installer.
DokuWikiInstaller::$locations protected property Overrides BaseInstaller::$locations
DokuWikiInstaller::inflectPackageVars public function Format package name. Overrides BaseInstaller::inflectPackageVars
DokuWikiInstaller::inflectPluginVars protected function
DokuWikiInstaller::inflectTemplateVars protected function