function drush_sitealias_uri_to_site_dir

8.0.x sitealias.inc drush_sitealias_uri_to_site_dir($uri, $site_root = NULL)
6.x sitealias.inc drush_sitealias_uri_to_site_dir($uri)
7.x sitealias.inc drush_sitealias_uri_to_site_dir($uri, $site_root = NULL)
3.x sitealias.inc drush_sitealias_uri_to_site_dir($uri)
4.x sitealias.inc drush_sitealias_uri_to_site_dir($uri)
5.x sitealias.inc drush_sitealias_uri_to_site_dir($uri)
master sitealias.inc drush_sitealias_uri_to_site_dir($uri, $site_root = NULL)

Convert from a URI to a site directory.

Parameters

uri: A uri, such as http://domain.com:8080/drupal

Return value

string A directory, such as domain.com.8080.drupal

7 calls to drush_sitealias_uri_to_site_dir()
drush_sitealias_alias_record_to_spec in includes/sitealias.inc
Convert from an alias record to a site specification
drush_sitealias_get_record in includes/sitealias.inc
Get a site alias record given an alias name or site specification.
drush_sitealias_local_site_path in includes/sitealias.inc
Return the full path to the site directory of the given alias record.
_drush_sitealias_add_transient_defaults in includes/sitealias.inc
Add "transient" default values to the given alias record. The difference between a static default and a transient default is that static defaults -always- exist in the alias record, whereas transient defaults are only added if the given…
_drush_sitealias_find_record_for_local_site in includes/sitealias.inc
If '$alias' is the name of a folder in the sites folder of the given drupal root, then build an alias record for it

... See full list

File

includes/sitealias.inc, line 1146
The site alias API.

Code

function drush_sitealias_uri_to_site_dir($uri) {
  return str_replace(array('http://', '/', ':'), array('', '.', '.'), $uri);
}