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

Breadcrumb

  1. Drupal Core 11.1.x

RadPHPInstaller.php

Namespace

Composer\Installers

File

vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php

View source
<?php

namespace Composer\Installers;

class RadPHPInstaller extends BaseInstaller {
    
    /** @var array<string, string> */
    protected $locations = array(
        'bundle' => 'src/{$name}/',
    );
    
    /**
     * Format package name to CamelCase
     */
    public function inflectPackageVars(array $vars) : array {
        $nameParts = explode('/', $vars['name']);
        foreach ($nameParts as &$value) {
            $value = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $value));
            $value = str_replace(array(
                '-',
                '_',
            ), ' ', $value);
            $value = str_replace(' ', '', ucwords($value));
        }
        $vars['name'] = implode('/', $nameParts);
        return $vars;
    }

}

Classes

Title Deprecated Summary
RadPHPInstaller

API Navigation

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