getPackagePath() public method

Returns the full path to this package's main directory
public getPackagePath ( ) : string
return string Path to this package's main directory
 /**
  * @param PackageInterface $package
  * @return array
  */
 protected function getPrimaryNamespaceAndEntryPath(PackageInterface $package)
 {
     $autoloadConfigurations = $package->getComposerManifest('autoload');
     $firstAutoloadType = null;
     $firstAutoloadConfiguration = null;
     foreach ($autoloadConfigurations as $autoloadType => $autoloadConfiguration) {
         if (ClassLoader::isAutoloadTypeWithPredictableClassPath($autoloadType)) {
             $firstAutoloadType = $autoloadType;
             $firstAutoloadConfiguration = $autoloadConfiguration;
             break;
         }
     }
     $autoloadPaths = reset($firstAutoloadConfiguration);
     $firstAutoloadPath = is_array($autoloadPaths) ? reset($autoloadPaths) : $autoloadPaths;
     $namespace = key($firstAutoloadConfiguration);
     $autoloadPathPostfix = '';
     if ($firstAutoloadType === ClassLoader::MAPPING_TYPE_PSR0) {
         $autoloadPathPostfix = str_replace('\\', '/', trim($namespace, '\\'));
     }
     return [$namespace, Files::concatenatePaths([$package->getPackagePath(), $firstAutoloadPath, $autoloadPathPostfix]), $firstAutoloadType];
 }
 /**
  * Creates a dummy class file inside $package's path
  * and requires it for propagation
  *
  * @param PackageInterface $package
  * @return object The dummy object of the class which was created
  */
 protected function createDummyObjectForPackage(PackageInterface $package)
 {
     $namespaces = $package->getNamespaces();
     $dummyClassName = 'Someclass' . md5(uniqid(mt_rand(), true));
     $fullyQualifiedClassName = '\\' . reset($namespaces) . '\\' . $dummyClassName;
     $dummyClassFilePath = Files::concatenatePaths([$package->getPackagePath(), PackageInterface::DIRECTORY_CLASSES, $dummyClassName . '.php']);
     file_put_contents($dummyClassFilePath, '<?php namespace ' . reset($namespaces) . '; class ' . $dummyClassName . ' {}');
     require $dummyClassFilePath;
     return new $fullyQualifiedClassName();
 }