Documentation

Capable

Plugins which need to expose various implementations of the Composer Plugin Capabilities must have their declared Plugin class implementing this interface.

Table of Contents

getCapabilities()  : array<string|int, string>
Method by which a Plugin announces its API implementations, through an array with a special structure.

Methods

getCapabilities()

Method by which a Plugin announces its API implementations, through an array with a special structure.

public getCapabilities() : array<string|int, string>

The key must be a string, representing a fully qualified class/interface name which Composer Plugin API exposes. The value must be a string as well, representing the fully qualified class name of the implementing class.

Tags
tutorial

return array( 'Composer\Plugin\Capability\CommandProvider' => 'My\CommandProvider', 'Composer\Plugin\Capability\Validator' => 'My\Validator', );

Return values
array<string|int, string>

Search results