PluginProbe
QuadMenu – Mega Menu / 3.3.8
QuadMenu – Mega Menu v3.3.8
3.3.8 3.3.7 3.3.6 trunk 1.8.4 1.8.5 1.8.7 1.8.8 1.8.9 1.9.0 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 88 releases
quadmenu / vendor / automattic / jetpack-composer-plugin / src / class-manager.php

class-manager.php in QuadMenu – Mega Menu 3.3.8, at vendor/automattic/jetpack-composer-plugin/src/class-manager.php

41 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The installer manager class file.
4 *
5 * @package automattic/jetpack-composer-plugin
6 */
7
8 namespace Automattic\Jetpack\Composer;
9
10 use Composer\Installer\LibraryInstaller;
11 use Composer\Package\PackageInterface;
12
13 /**
14 * The manager class that is the main agent for the installer plugin.
15 * It handles the installation process by accepting the installed package
16 * and modifying its installation path.
17 * */
18 class Manager extends LibraryInstaller {
19
20 /**
21 * Receives a supported package instance and modifies its installation path.
22 *
23 * @param PackageInterface $package the installed package object.
24 * @return string modified installation path.
25 */
26 public function getInstallPath( PackageInterface $package ) {
27 return 'jetpack_vendor/' . $package->getPrettyName();
28 }
29
30 /**
31 * Declares the supported package type by returning true whenever it meets a package
32 * that declares itself as a Jetpack library.
33 *
34 * @param string $package_type a package type string.
35 * @return boolean whether the package is supported.
36 */
37 public function supports( $package_type ) {
38 return 'jetpack-library' === $package_type;
39 }
40 }
41