| Total Complexity | 8 | 
| Total Lines | 29 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 3 | class DatabaseOptions { | ||
| 4 | private $db; | ||
| 5 | private $options; | ||
| 6 | |||
| 7 | 	public function __construct($db, $options) { | ||
| 8 | $this->db = $db; | ||
| 9 | $this->options = $options; | ||
| 10 | } | ||
| 11 | |||
| 12 | 	public function getAdapter() { | ||
| 13 | if ($this->db instanceof \Maphper\DataSource) return $this->db; | ||
| 14 | |||
| 15 | $adapter = '\\Maphper\\DataSource\\' . ucfirst($this->db->getAttribute(\PDO::ATTR_DRIVER_NAME)) . 'Adapter'; | ||
| 16 | |||
| 17 | return new $adapter($this->db); | ||
| 18 | } | ||
| 19 | |||
| 20 | 	public function getEditMode() { | ||
| 24 | } | ||
| 25 | |||
| 26 | 	public function getCacheMode() { | ||
| 28 | } | ||
| 29 | |||
| 30 | 	public function read($option) { | ||
| 34 |