| 1 | <?php |
||
| 20 | abstract class AbstractDatabase { |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Database. |
||
| 24 | * |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | private $database; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Password. |
||
| 31 | * |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | private $password; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Username. |
||
| 38 | * |
||
| 39 | * @var string |
||
| 40 | */ |
||
| 41 | private $username; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Constructor. |
||
| 45 | */ |
||
| 46 | protected function __construct() { |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Get the database. |
||
| 52 | * |
||
| 53 | * @return string Returns the database. |
||
| 54 | */ |
||
| 55 | final public function getDatabase() { |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Get the paswword. |
||
| 61 | * |
||
| 62 | * @return string Returns the password. |
||
| 63 | */ |
||
| 64 | final public function getPassword() { |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Get the username. |
||
| 70 | * |
||
| 71 | * @return string Returns the username. |
||
| 72 | */ |
||
| 73 | final public function getUsername() { |
||
| 76 | |||
| 77 | /** |
||
| 78 | * Set the database. |
||
| 79 | * |
||
| 80 | * @param string $database The database. |
||
| 81 | * @return AbstractDatabase Returns the database. |
||
| 82 | */ |
||
| 83 | final public function setDatabase($database) { |
||
| 87 | |||
| 88 | /** |
||
| 89 | * Set the password. |
||
| 90 | * |
||
| 91 | * @param string $password The password. |
||
| 92 | * @return AbstractDatabase Returns the database. |
||
| 93 | */ |
||
| 94 | final public function setPassword($password) { |
||
| 98 | |||
| 99 | /** |
||
| 100 | * Set the username. |
||
| 101 | * |
||
| 102 | * @param string $username The username. |
||
| 103 | * @return AbstractDatabase Returns the database. |
||
| 104 | */ |
||
| 105 | final public function setUsername($username) { |
||
| 109 | |||
| 110 | } |
||
| 111 |