Is it posiible to connect to database server, without creating a multiple databases connections in phalcon, without using an external libs?
$connection = new \Phalcon\Db\Adapter\Pdo\Mysql(
[
'host' => 'localhost',
'username' => 'user',
'password' => 'pass',
//'dbname' => 'database1',
'port' => 3306,
]
);
class SomeModel extends Model
{
// ....
/**
* Set the table source.
*
* @return string
*/
public function getSource()
{
return 'database1.some';
}
}
class OtherModel extends Model
{
// ....
/**
* Set the table source.
*
* @return string
*/
public function getSource()
{
return 'database2.other';
}
}