protected function getInstallerConfig(PackageInterface $package)
    {
        if ($this->installerConfig !== null) {
            return $this->installerConfig;
        }

        $type       = $package->getType();
        $prettyName = $package->getPrettyName();

        if (strpos($prettyName, '/') !== false) {
            list($vendor, $name) = explode('/', $prettyName);
        } else {
            $vendor = '';
            $name   = $prettyName;
        }

        $extra = $package->getExtra();

        if (!empty($extra['installer-name'])) {
            $name = $extra['installer-name'];
        }

        $loader = 'mu-plugins/' . $name . '.php';

        if (!empty($extra['installer-loader'])) {
            $loader = $extra['installer-loader'];
        }

        return compact('name', 'vendor', 'type', 'loader');
    }
protected function getInstallerConfig(PackageInterface $package)
    {
        if ($this->installerConfig !== null) {
            return $this->installerConfig;
        }

        $type       = $package->getType();
        $prettyName = $package->getPrettyName();

        if (strpos($prettyName, '/') !== false) {
            list($vendor, $name) = explode('/', $prettyName);
        } else {
            $vendor = '';
            $name   = $prettyName;
        }

        $extra = $package->getExtra();

        if (!empty($extra['installer-name'])) {
            $name = $extra['installer-name'];
        }

        $loader = 'mu-plugins/' . $name . '.php';

        if (!empty($extra['installer-loader'])) {
            $loader = $extra['installer-loader'];
        }

        return compact('name', 'vendor', 'type', 'loader');
    }
protected function getInstallerConfig ( PackageInterface $ package ) { if ( $ this -> installerConfig !== null ) { return $ this -> installerConfig ; } $ type = $ package -> getType ( ) ; $ prettyName = $ package -> getPrettyName ( ) ; if ( strpos ( $ prettyName , '/' ) !== false ) { list ( $ vendor , $ name ) = explode ( '/' , $ prettyName ) ; } else { $ vendor = '' ; $ name = $ prettyName ; } $ extra = $ package -> getExtra ( ) ; if ( ! empty ( $ extra [ 'installer-name' ] ) ) { $ name = $ extra [ 'installer-name' ] ; } $ loader = 'mu-plugins/' . $ name . '.php' ; if ( ! empty ( $ extra [ 'installer-loader' ] ) ) { $ loader = $ extra [ 'installer-loader' ] ; } return compact ( 'name' , 'vendor' , 'type' , 'loader' ) ; }
Retrieves configuration values from a packages's `composer.json`.

@param PackageInterface $package An instance of PackageInterface.

@return string[] The configuration values.
Retrieves configuration values from a packages s composer . json .