function drush_is_local_host

8.0.x environment.inc drush_is_local_host($host)
6.x environment.inc drush_is_local_host($host)
7.x environment.inc drush_is_local_host($host)
3.x environment.inc drush_is_local_host($host)
4.x environment.inc drush_is_local_host($host)
5.x environment.inc drush_is_local_host($host)
master environment.inc drush_is_local_host($host)

Make a determination whether or not the given host is local or not.

Parameters

host: A hostname, 'localhost' or '127.0.0.1'.

Return value

True if the host is local.

6 calls to drush_is_local_host()
drush_sitealias_evaluate_path in includes/sitealias.inc
Evaluate a path from its shorthand form to a literal path usable by rsync.
drush_sitealias_get_db_spec in includes/sitealias.inc
Return the $db_spec record for the database associated with the provided alias record. which will be used to first add the database information to the alias records, invoking sql-conf to look them up if necessary.
drush_sitealias_set_alias_context in includes/sitealias.inc
Given a site alias record, copy selected fields from it into the drush 'alias' context. The 'alias' context has lower precedence than the 'cli' context, so values set by an alias record can be overridden by…
drush_sqlsync_sql_sync in commands/sql/sqlsync.drush.inc
_drush_backend_generate_command in includes/backend.inc
Generate a command to execute.

... See full list

File

includes/environment.inc, line 619
Functions used by drush to query the environment and setting the current configuration.

Code

function drush_is_local_host($host) {
  // Check to see if the provided host is "local".
  // @see hook_drush_sitealias_alter() in drush.api.php.
  if (($host == 'localhost') || ($host == '127.0.0.1')) {
    return TRUE;
  }

  return FALSE;
}