You are here

function domain_machine_name in Domain Access 7.3

Create a machine name for a domain record.

Parameters

$subdomain: The subdomain string of the record, which should be unique.

Return value

A string with dot and colon transformed to underscore.

4 calls to domain_machine_name()
domain_default in ./domain.module
Assigns the default settings to domain 0, the root domain.
domain_save in ./domain.module
Save a domain record.
domain_set_primary_domain in ./domain.module
Set the primary domain properly, if necessary.
MigrateDestinationDomain::import in ./domain.migrate.inc
Import a single row.

File

./domain.module, line 3775
Core module functions for the Domain Access suite.

Code

function domain_machine_name($subdomain) {
  return preg_replace('/[^a-z0-9_]+/', '_', $subdomain);
}