/**
  * 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)
 {
     $dummyClassName = 'Someclass' . md5(uniqid(mt_rand(), TRUE));
     $fullyQualifiedClassName = '\\' . $package->getNamespace() . '\\' . $dummyClassName;
     $dummyClassFilePath = \TYPO3\Flow\Utility\Files::concatenatePaths(array($package->getPackagePath(), PackageInterface::DIRECTORY_CLASSES, $dummyClassName . '.php'));
     file_put_contents($dummyClassFilePath, '<?php namespace ' . $package->getNamespace() . '; class ' . $dummyClassName . ' {}');
     require $dummyClassFilePath;
     return new $fullyQualifiedClassName();
 }
 /**
  * Extracts the namespace from a package
  *
  * @param \TYPO3\Flow\Package\PackageInterface $package
  * @return void
  */
 protected function buildPackageNamespace(\TYPO3\Flow\Package\PackageInterface $package)
 {
     $packageNamespace = $package->getNamespace();
     // Ignore legacy extensions with unkown vendor name
     if ($packageNamespace[0] !== '*') {
         $this->packageNamespaces[$packageNamespace] = array('namespaceLength' => strlen($packageNamespace), 'classesPath' => $package->getClassesPath(), 'packagePath' => $package->getPackagePath(), 'substituteNamespaceInPath' => $package instanceof PackageInterface);
     }
 }