Composer\Installers\Installer::getInstallPath PHP Method

getInstallPath() public method

{@inheritDoc}
public getInstallPath ( Composer\Package\PackageInterface $package )
$package Composer\Package\PackageInterface
    public function getInstallPath(PackageInterface $package)
    {
        $type = $package->getType();
        $frameworkType = $this->findFrameworkType($type);
        if ($frameworkType === false) {
            throw new \InvalidArgumentException('Sorry the package type of this package is not yet supported.');
        }
        $class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
        $installer = new $class($package, $this->composer, $this->getIO());
        return $installer->getInstallPath($package, $frameworkType);
    }

Usage Example

Example #1
0
 /**
  * testTypo3Inflection
  */
 public function testTypo3Inflection()
 {
     $installer = new Installer($this->io, $this->composer);
     $package = new Package('typo3/fluid', '1.0.0', '1.0.0');
     $package->setAutoload(array('psr-0' => array('TYPO3\\Fluid' => 'Classes')));
     $package->setType('typo3-flow-package');
     $result = $installer->getInstallPath($package);
     $this->assertEquals('Packages/Application/TYPO3.Fluid/', $result);
 }
All Usage Examples Of Composer\Installers\Installer::getInstallPath