public function __construct($host1, $db1, $user1, $pass1, $host2, $db2, $user2, $pass2) { $this->dbOld = new DBMysql($host1, $user1, $pass1); $this->dbOld->connect($db1); $this->dbNew = new DBMysql($host2, $user2, $pass2); $this->dbNew->connect($db2); }
<?php $db = new DBMysql('localhost', 'user', 'password'); $db->connect('database_name'); return $db;