Property | Type | Description | |
---|---|---|---|
$composer | Composer\Composer | ||
$io | Composer\IO\IOInterface |
Method | Description | |
---|---|---|
activate ( Composer\Composer $composer, Composer\IO\IOInterface $io ) | The function that is called when the plugin is activated | |
addKey ( Composer\Plugin\PreFileDownloadEvent $event ) | Add the key from the environment to the event url | |
addVersion ( Composer\Installer\PackageEvent $event ) | Add the version to the package url | |
getSubscribedEvents ( ) : array | Subscribe this Plugin to relevant Events |
Method | Description | |
---|---|---|
addParameterToUrl ( string $url, string $parameter, string $value ) : string | Add a parameter to the given url | |
getKeyFromEnv ( ) : string | Get the ACF PRO key from the environment | |
getPackageFromOperation ( Composer\DependencyResolver\Operation\OperationInterface $operation ) : PackageInterface | Get the package from a given operation | |
isAcfProPackageUrl ( $url ) : boolean | Test if the given url is the ACF PRO download url | |
loadDotEnv ( ) | Make environment variables in .env available if .env exists | |
removeParameterFromUrl ( string $url, string $parameter ) : string | Remove a given parameter from the given url | |
validateVersion ( string $version ) : string | Validate that the version is an exact major.minor.patch.optional version |
public activate ( Composer\Composer $composer, Composer\IO\IOInterface $io ) | ||
$composer | Composer\Composer | The composer object |
$io | Composer\IO\IOInterface | Not used |
public addKey ( Composer\Plugin\PreFileDownloadEvent $event ) | ||
$event | Composer\Plugin\PreFileDownloadEvent | The event that called this method |
public addVersion ( Composer\Installer\PackageEvent $event ) | ||
$event | Composer\Installer\PackageEvent | The event that called the method |
protected getKeyFromEnv ( ) : string | ||
return | string | The key from the environment |
protected getPackageFromOperation ( Composer\DependencyResolver\Operation\OperationInterface $operation ) : PackageInterface | ||
$operation | Composer\DependencyResolver\Operation\OperationInterface | The operation |
return | PackageInterface | The package of the operation |
public static getSubscribedEvents ( ) : array | ||
return | array | An array of events that the plugin subscribes to |
protected isAcfProPackageUrl ( $url ) : boolean | ||
return | boolean |
protected loadDotEnv ( ) |
protected validateVersion ( string $version ) : string | ||
$version | string | The version that should be validated |
return | string | The valid version |