Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. GravInstaller.php

function GravInstaller::inflectPackageVars

Format package name

Overrides BaseInstaller::inflectPackageVars

File

vendor/composer/installers/src/Composer/Installers/GravInstaller.php, line 16

Class

GravInstaller

Namespace

Composer\Installers

Code

public function inflectPackageVars(array $vars) : array {
    $restrictedWords = implode('|', array_keys($this->locations));
    $vars['name'] = strtolower($vars['name']);
    $vars['name'] = $this->pregReplace('/^(?:grav-)?(?:(?:' . $restrictedWords . ')-)?(.*?)(?:-(?:' . $restrictedWords . '))?$/ui', '$1', $vars['name']);
    return $vars;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal