| 1 | <?php namespace SearchReplace; |
||
| 11 | class SearchReplaceDatabase implements SearchReplaceDatabaseInterface |
||
| 12 | { |
||
| 13 | protected $db, $host, $username, $password, $database; |
||
|
|
|||
| 14 | |||
| 15 | public function __construct($host, $username, $password, $database) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Return db instance |
||
| 27 | * |
||
| 28 | * @return mixed |
||
| 29 | * @throws SearchReplaceException |
||
| 30 | */ |
||
| 31 | public function db() |
||
| 41 | |||
| 42 | public function getDatabase() |
||
| 46 | |||
| 47 | public function useDatabase() |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Get All Tables |
||
| 61 | * @return mixed |
||
| 62 | */ |
||
| 63 | public function getAllTables() |
||
| 69 | } |
||
| 70 |
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.