-
Notifications
You must be signed in to change notification settings - Fork 0
/
traits.php
64 lines (51 loc) · 1.58 KB
/
traits.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
trait enviromentConfig{
echo "Version ".$this->version." Host ".$this->port." Replication ".$this->replication. "Environment ".$this->environment;
}
interface engineDB{
public function connect();
}
class Mysql implements engineDB{
use enviromentConfig;
public $environment = "localhost";
public $version = "TEST version";
public $port = "TEST version";
public $replication = "TEST version";
public $version = "TEST version";
private $db_mysql_user;
private $db_mysql_pass;
private $db_mysql_host;
public function connect(){
echo "Logic connection";
}
}
class Oracle implements engineDB{
use enviromentConfig;
public $environment = "localhost";
public $version = "TEST version";
public $port = "TEST version";
public $replication = "TEST version";
public $version = "TEST version";
private $db_oracle_user;
private $db_oracle_pass;
private $db_oracle_host;
public function connect(){
echo "Logic connection";
}
}
class mongoDB implements engineDB{
use enviromentConfig;
public $environment = "localhost";
public $version = "TEST version";
public $port = "TEST version";
public $replication = "TEST version";
public $version = "TEST version";
private $db_mongodb_user;
private $db_mongodb_pass;
private $db_mongodb_host;
public function connect(){
echo "Logic connection";
}
}
$mysql = new Mysql();
$mysql->enviromentConfig();