1 | <?php |
||
29 | class Plugin implements PluginInterface, EventSubscriberInterface, Capable { |
||
30 | protected $composer; |
||
31 | protected $io; |
||
32 | |||
33 | /** |
||
34 | * Apply plugin modifications to Composer |
||
35 | * |
||
36 | * @param Composer $composer |
||
37 | * @param IOInterface $io |
||
38 | */ |
||
39 | public function activate(Composer $composer, IOInterface $io) { |
||
46 | |||
47 | /** |
||
48 | * @return array |
||
|
|||
49 | */ |
||
50 | public function getCapabilities() { |
||
55 | |||
56 | /** |
||
57 | * |
||
58 | * Events |
||
59 | * |
||
60 | * Command Events Composer\Script\Event |
||
61 | * |
||
62 | * pre-install-cmd occurs before the install command is executed with a lock file present. |
||
63 | * post-install-cmd occurs after the install command has been executed with a lock file present. |
||
64 | * pre-update-cmd occurs before the update command is executed, or before the install command is executed without a lock file present. |
||
65 | * post-update-cmd occurs after the update command has been executed, or after the install command has been executed without a lock file present. |
||
66 | * post-status-cmd occurs after the status command has been executed. |
||
67 | * pre-archive-cmd occurs before the archive command is executed. |
||
68 | * post-archive-cmd occurs after the archive command has been executed. |
||
69 | * pre-autoload-dump occurs before the autoloader is dumped, either during install/update, or via the dump-autoload command. |
||
70 | * post-autoload-dump occurs after the autoloader has been dumped, either during install/update, or via the dump-autoload command. |
||
71 | * post-root-package-install occurs after the root package has been installed, during the create-project command. |
||
72 | * post-create-project-cmd occurs after the create-project command has been executed. |
||
73 | * |
||
74 | * Installer Events Composer\Installer\InstallerEvent |
||
75 | * |
||
76 | * pre-dependencies-solving occurs before the dependencies are resolved. |
||
77 | * post-dependencies-solving occurs after the dependencies have been resolved. |
||
78 | * |
||
79 | * Package Events Composer\Installer\PackageEvent |
||
80 | * |
||
81 | * pre-package-install occurs before a package is installed. |
||
82 | * post-package-install occurs after a package has been installed. |
||
83 | * pre-package-update occurs before a package is updated. |
||
84 | * post-package-update occurs after a package has been updated. |
||
85 | * pre-package-uninstall occurs before a package is uninstalled. |
||
86 | * post-package-uninstall occurs after a package has been uninstalled. |
||
87 | * |
||
88 | * Plugin Events Composer\Plugin\PluginEvents |
||
89 | * |
||
90 | * init occurs after a Composer instance is done being initialized. |
||
91 | * command occurs before any Composer Command is executed on the CLI. It provides you with access to the input and output objects of the program. |
||
92 | * pre-file-download occurs before files are downloaded and allows you to manipulate the RemoteFilesystem object prior to downloading files based on the URL to be downloaded. |
||
93 | */ |
||
94 | public static function getSubscribedEvents() { |
||
101 | |||
102 | /** |
||
103 | * @param PreFileDownloadEvent $event |
||
104 | */ |
||
105 | public function onPreFileDownload(PreFileDownloadEvent $event) { |
||
113 | |||
114 | public static function setPermissions(Event $event) { |
||
134 | |||
135 | public static function getWritableDirs(Event $event) { |
||
143 | |||
144 | public static function setPermissionsSetfacl(Event $event) { |
||
148 | |||
149 | public static function setPermissionsChmod(Event $event) { |
||
153 | |||
154 | public static function SetfaclPermissionsSetter($path) { |
||
160 | |||
161 | public static function ChmodPermissionsSetter($path) { |
||
167 | |||
168 | public static function runCommand($command, $path) { |
||
171 | |||
172 | public static function getHttpdUser() { |
||
175 | |||
176 | public static function runProcess($commandline) { |
||
182 | } |
||
183 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.