Maurits van der Schee 5 years ago
parent
commit
95021afbb8
3 changed files with 6 additions and 6 deletions
  1. 3
    3
      api.php
  2. 1
    1
      src/Tqdev/PhpCrudApi/Config.php
  3. 2
    2
      src/Tqdev/PhpCrudApi/Database/GenericDB.php

+ 3
- 3
api.php View File

3466
     private $columns;
3466
     private $columns;
3467
     private $converter;
3467
     private $converter;
3468
 
3468
 
3469
-    private function getDsn(string $address, string $port = null, string $database = null): string
3469
+    private function getDsn(string $address, string $port, string $database): string
3470
     {
3470
     {
3471
         switch ($this->driver) {
3471
         switch ($this->driver) {
3472
             case 'mysql':return "$this->driver:host=$address;port=$port;dbname=$database;charset=utf8mb4";
3472
             case 'mysql':return "$this->driver:host=$address;port=$port;dbname=$database;charset=utf8mb4";
3514
         }
3514
         }
3515
     }
3515
     }
3516
 
3516
 
3517
-    public function __construct(string $driver, string $address, string $port = null, string $database = null, string $username = null, string $password = null)
3517
+    public function __construct(string $driver, string $address, string $port, string $database, string $username, string $password)
3518
     {
3518
     {
3519
         $this->driver = $driver;
3519
         $this->driver = $driver;
3520
         $this->database = $database;
3520
         $this->database = $database;
7200
         return $this->values['cacheTime'];
7200
         return $this->values['cacheTime'];
7201
     }
7201
     }
7202
 
7202
 
7203
-    public function getDebug(): string
7203
+    public function getDebug(): bool
7204
     {
7204
     {
7205
         return $this->values['debug'];
7205
         return $this->values['debug'];
7206
     }
7206
     }

+ 1
- 1
src/Tqdev/PhpCrudApi/Config.php View File

147
         return $this->values['cacheTime'];
147
         return $this->values['cacheTime'];
148
     }
148
     }
149
 
149
 
150
-    public function getDebug(): string
150
+    public function getDebug(): bool
151
     {
151
     {
152
         return $this->values['debug'];
152
         return $this->values['debug'];
153
     }
153
     }

+ 2
- 2
src/Tqdev/PhpCrudApi/Database/GenericDB.php View File

17
     private $columns;
17
     private $columns;
18
     private $converter;
18
     private $converter;
19
 
19
 
20
-    private function getDsn(string $address, string $port = null, string $database = null): string
20
+    private function getDsn(string $address, string $port, string $database): string
21
     {
21
     {
22
         switch ($this->driver) {
22
         switch ($this->driver) {
23
             case 'mysql':return "$this->driver:host=$address;port=$port;dbname=$database;charset=utf8mb4";
23
             case 'mysql':return "$this->driver:host=$address;port=$port;dbname=$database;charset=utf8mb4";
65
         }
65
         }
66
     }
66
     }
67
 
67
 
68
-    public function __construct(string $driver, string $address, string $port = null, string $database = null, string $username = null, string $password = null)
68
+    public function __construct(string $driver, string $address, string $port, string $database, string $username, string $password)
69
     {
69
     {
70
         $this->driver = $driver;
70
         $this->driver = $driver;
71
         $this->database = $database;
71
         $this->database = $database;

Loading…
Cancel
Save