\Composer\InstallersCraftInstaller

Installer for Craft Plugins

Summary

Methods
Properties
Constants
__construct()
getInstallPath()
inflectPackageVars()
getLocations()
No public properties found
NAME_PREFIX
NAME_SUFFIX
templatePath()
mapCustomInstallPaths()
$locations
$composer
$package
$io
N/A
inflectPluginVars()
No private properties found
N/A

Constants

NAME_PREFIX

NAME_PREFIX = 'craft'

NAME_SUFFIX

NAME_SUFFIX = 'plugin'

Properties

$locations

$locations : 

Type

$composer

$composer : 

Type

$package

$package : 

Type

$io

$io : 

Type

Methods

__construct()

__construct(\Composer\Package\PackageInterface  $package = null, \Composer\Composer  $composer = null, \Composer\IO\IOInterface  $io = null) 

Initializes base installer.

Parameters

\Composer\Package\PackageInterface $package
\Composer\Composer $composer
\Composer\IO\IOInterface $io

getInstallPath()

getInstallPath(\Composer\Package\PackageInterface  $package, string  $frameworkType = '') : string

Return the install path based on package type.

Parameters

\Composer\Package\PackageInterface $package
string $frameworkType

Returns

string

inflectPackageVars()

inflectPackageVars(array  $vars) : array

Strip `craft-` prefix and/or `-plugin` suffix from package names

Parameters

array $vars

Returns

array

getLocations()

getLocations() : array

Gets the installer's locations

Returns

array

templatePath()

templatePath(string  $path, array  $vars = array()) : string

Replace vars in a path

Parameters

string $path
array $vars

Returns

string

mapCustomInstallPaths()

mapCustomInstallPaths(array  $paths, string  $name, string  $type, string  $vendor = NULL) : string

Search through a passed paths array for a custom install path.

Parameters

array $paths
string $name
string $type
string $vendor

= NULL

Returns

string

inflectPluginVars()

inflectPluginVars(  $vars) 

Parameters

$vars