| 1 |
<?php |
| 2 |
|
| 3 |
namespace Averta\WordPress\Database\ORM; |
| 4 |
|
| 5 |
class Query extends \TypeRocket\Database\Query |
| 6 |
{ |
| 7 |
/** |
| 8 |
* @return \wpdb |
| 9 |
*/ |
| 10 |
protected function establishConnection() |
| 11 |
{ |
| 12 |
$connection = Connection::getFromContainer(); |
| 13 |
|
| 14 |
if(!$name = $this->connection) { |
| 15 |
return $connection->default(); |
| 16 |
} |
| 17 |
|
| 18 |
return $connection->get($name); |
| 19 |
} |
| 20 |
} |
| 21 |
|