1 | <?php /** MicroDbDriver */ |
||
22 | class DbDriver extends CacheDriver |
||
23 | { |
||
24 | /** @var IDriver $driver DB driver */ |
||
25 | protected $driver; |
||
26 | /** @var string $table table name */ |
||
27 | protected $table; |
||
28 | |||
29 | |||
30 | /** |
||
31 | * Constructor |
||
32 | * |
||
33 | * @access public |
||
34 | * |
||
35 | * @param array $config config array |
||
36 | * |
||
37 | * @result void |
||
38 | * @throws Exception |
||
39 | */ |
||
40 | public function __construct(array $config = []) |
||
60 | |||
61 | /** |
||
62 | * @inheritdoc |
||
63 | */ |
||
64 | public function check() |
||
68 | |||
69 | /** |
||
70 | * @inheritdoc |
||
71 | * @throws \Micro\Base\Exception |
||
72 | */ |
||
73 | public function get($name) |
||
82 | |||
83 | /** |
||
84 | * @inheritdoc |
||
85 | * @throws \Micro\Base\Exception |
||
86 | * @param string $name |
||
87 | */ |
||
88 | protected function getElement($name) |
||
99 | |||
100 | /** |
||
101 | * @inheritdoc |
||
102 | */ |
||
103 | public function set($name, $value) |
||
107 | |||
108 | /** |
||
109 | * @inheritdoc |
||
110 | */ |
||
111 | public function delete($name) |
||
115 | |||
116 | /** |
||
117 | * @inheritdoc |
||
118 | */ |
||
119 | public function clean() |
||
123 | |||
124 | /** |
||
125 | * @inheritdoc |
||
126 | */ |
||
127 | public function info() |
||
131 | |||
132 | /** |
||
133 | * @inheritdoc |
||
134 | * @throws \Micro\Base\Exception |
||
135 | */ |
||
136 | public function getMeta($id) |
||
140 | |||
141 | /** |
||
142 | * @inheritdoc |
||
143 | */ |
||
144 | public function increment($name, $offset = 1) |
||
148 | |||
149 | /** |
||
150 | * @inheritdoc |
||
151 | */ |
||
152 | public function decrement($name, $offset = 1) |
||
156 | } |
||
157 |