protected function DrushMakeProject::preprocessLocalFileUrl

8.0.x make.project.inc protected DrushMakeProject::preprocessLocalFileUrl(&$info)
6.x make.project.inc protected DrushMakeProject::preprocessLocalFileUrl(&$info)
7.x make.project.inc protected DrushMakeProject::preprocessLocalFileUrl(&$info)
master make.project.inc protected DrushMakeProject::preprocessLocalFileUrl(&$info)

Rewrite relative URLs and file:/// URLs

relative path -> absolute path using the make_directory local file:/// urls -> local paths

Parameters

mixed &$info: Either an array or a simple url string. The `$info` variable will be transformed into an array.

2 calls to DrushMakeProject::preprocessLocalFileUrl()
DrushMakeProject::applyPatches in commands/make/make.project.inc
Retrieve and apply any patches specified by the makefile to this project.
DrushMakeProject::getTranslations in commands/make/make.project.inc
Retrieve translations for this project.

File

commands/make/make.project.inc, line 225
Drush Make processing classes.

Class

DrushMakeProject
The base project class.

Code

protected function preprocessLocalFileUrl(&$info) {
  if (is_string($info)) {
    $info = array(
      'url' => $info,
      'local' => FALSE,
    );
  }

  if (!_drush_is_url($info['url']) && !drush_is_absolute_path($info['url'])) {
    $info['url'] = $this->make_directory . '/' . $info['url'];
    $info['local'] = TRUE;
  }
  elseif (substr($info['url'], 0, 8) == 'file:///') {
    $info['url'] = substr($info['url'], 7);
    $info['local'] = TRUE;
  }
}