/**
  * @param array $data
  * @param string $path_prefix
  */
 function __construct(array $data, $path_prefix)
 {
     parent::__construct($data, $path_prefix);
     $this->targetDir = rtrim($data['target-dir'], '/') . '/';
 }
 /**
  * {@inheritdoc}
  */
 function composerJson($file)
 {
     $json = ComposerJson::createFromFile($file);
     $json->writeToAdapter($this);
 }
 /**
  * Scans a composer.json file provided by a Composer package.
  *
  * @param string $file
  * @param bool $relative
  *   If TRUE, the paths will be relative to $this->localDirectory.
  *
  * @throws \Exception
  */
 function composerJson($file, $relative = TRUE) {
   $relative && $file = $this->localDirectory . $file;
   $json = ComposerJson::createFromFile($file);
   $json->writeToAdapter($this->master);
 }