@@ -78,6 +78,8 @@ |
||
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | 80 | * {@inheritdoc} |
| 81 | + * @param integer $offset |
|
| 82 | + * @param integer $length |
|
| 81 | 83 | */ |
| 82 | 84 | public function getLimitClause($offset, $length) |
| 83 | 85 | { |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | */ |
| 7 | 7 | namespace Ray\AuraSqlModule\Pagerfanta; |
| 8 | 8 | |
| 9 | -use Aura\Sql\ExtendedPdo; |
|
| 10 | 9 | use Aura\Sql\ExtendedPdoInterface; |
| 11 | 10 | use Pagerfanta\Adapter\AdapterInterface; |
| 12 | 11 | |
@@ -60,6 +60,12 @@ discard block |
||
| 60 | 60 | : $this->configureSingleDsn($this->qualifer, $this->dsn, $this->user, $this->password); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | + /** |
|
| 64 | + * @param string $qualifer |
|
| 65 | + * @param string $dsn |
|
| 66 | + * @param string $user |
|
| 67 | + * @param string $password |
|
| 68 | + */ |
|
| 63 | 69 | private function configureSingleDsn($qualifer, $dsn, $user, $password) |
| 64 | 70 | { |
| 65 | 71 | $this->bind(ExtendedPdoInterface::class) |
@@ -73,6 +79,13 @@ discard block |
||
| 73 | 79 | $this->bind()->annotatedWith("{$qualifer}_password")->toInstance($password); |
| 74 | 80 | } |
| 75 | 81 | |
| 82 | + /** |
|
| 83 | + * @param string $qualifer |
|
| 84 | + * @param string $dsn |
|
| 85 | + * @param string $user |
|
| 86 | + * @param string $password |
|
| 87 | + * @param string $slaveList |
|
| 88 | + */ |
|
| 76 | 89 | private function configureMasterSlaveDsn($qualifer, $dsn, $user, $password, $slaveList) |
| 77 | 90 | { |
| 78 | 91 | $locator = new ConnectionLocator(); |
@@ -89,6 +89,9 @@ |
||
| 89 | 89 | $this->install(new AuraSqlReplicationModule($locator)); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | + /** |
|
| 93 | + * @param string $dsn |
|
| 94 | + */ |
|
| 92 | 95 | private function changeHost($dsn, $host) : string |
| 93 | 96 | { |
| 94 | 97 | \preg_match(self::PARSE_PDO_DSN_REGEX, $dsn, $parts); |