Rev | Line | |
---|
[123] | 1 | <?php |
---|
| 2 | |
---|
| 3 | /* |
---|
| 4 | * To change this template, choose Tools | Templates |
---|
| 5 | * and open the template in the editor. |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | /** |
---|
| 9 | * Description of DatabaseInterface |
---|
| 10 | * Initializes all the connectors, serves as only entrance and exit point |
---|
| 11 | * for the frontend |
---|
| 12 | * @author jkraaijeveld |
---|
| 13 | */ |
---|
| 14 | class DatabaseInterface { |
---|
| 15 | |
---|
| 16 | /** |
---|
| 17 | * Constructor for the DatabaseInterface class |
---|
| 18 | */ |
---|
| 19 | protected $applicationConnector; |
---|
| 20 | |
---|
| 21 | public function __construct() { |
---|
| 22 | $this->applicationConnector = new ApplicationConnector(); |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | public function get($type, $arguments) |
---|
| 26 | { |
---|
| 27 | switch($type) |
---|
| 28 | { |
---|
| 29 | case "application": |
---|
| 30 | return $this->applicationConnector->get($arguments); |
---|
| 31 | |
---|
| 32 | } |
---|
| 33 | } |
---|
[128] | 34 | |
---|
| 35 | public function set($rToolObject) |
---|
| 36 | { |
---|
| 37 | switch(get_class($rToolObject)) |
---|
| 38 | { |
---|
| 39 | case "Application": |
---|
| 40 | $this->applicationConnector->set($rToolObject); |
---|
| 41 | } |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | |
---|
[123] | 45 | } |
---|
| 46 | |
---|
| 47 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.