You are here

public function hostingService_db_mysql::context_import in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 db_server/hosting_db_server.service.inc \hostingService_db_mysql::context_import()
  2. 7.3 db_server/hosting_db_server.service.inc \hostingService_db_mysql::context_import()

Overrides hostingService::context_import

File

db_server/hosting_db_server.service.inc, line 125
Provide the hosting serivce classes for database integration.

Class

hostingService_db_mysql
A MySQL specific db service implementation class.

Code

public function context_import($context) {
  parent::context_import($context);
  $matches = array();
  preg_match("+^mysql://(.*):(.*)@.*\$+", stripslashes($context->master_db), $matches);
  $this->db_user = urldecode($matches[1]);
  $this->db_passwd = urldecode($matches[2]);
}