src/VendorPlugin.php
public function getLibrary(PackageEvent $event)
    {
        // Ensure package is the valid type
        $package = $this->getOperationPackage($event);
        if (!$package) {
            return null;
        }

        // Get appropriate installer and query install path
        $installer = $event->getComposer()->getInstallationManager()->getInstaller($package->getType());
        $path = $installer->getInstallPath($package);

        // Build module
        return new Library($this->getProjectPath(), $path);
    }
public function getLibrary(PackageEvent $event)
    {
        // Ensure package is the valid type
        $package = $this->getOperationPackage($event);
        if (!$package) {
            return null;
        }

        // Get appropriate installer and query install path
        $installer = $event->getComposer()->getInstallationManager()->getInstaller($package->getType());
        $path = $installer->getInstallPath($package);

        // Build module
        return new Library($this->getProjectPath(), $path);
    }
public function getLibrary ( PackageEvent $ event ) { // Ensure package is the valid type $ package = $ this -> getOperationPackage ( $ event ) ; if ( ! $ package ) { return null ; } // Get appropriate installer and query install path $ installer = $ event -> getComposer ( ) -> getInstallationManager ( ) -> getInstaller ( $ package -> getType ( ) ) ; $ path = $ installer -> getInstallPath ( $ package ) ; // Build module return new Library ( $ this -> getProjectPath ( ) , $ path ) ; }
Gets library being installed

@param PackageEvent $event
@return Library|null
Gets library being installed