BaseDriver::_get()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
nc 1
dl 0
loc 1
c 0
b 0
f 0
1
<?php
2
3
namespace OpenOauth\Core\DatabaseDriver;
4
5
/**
6
 * 数据库基类.
7
 *
8
 */
9
abstract class BaseDriver
10
{
11
    protected $databaseDir; // 数据路径
12
13
    /**
14
     * 初始化时设置路径.
15
     *
16
     * @param string $dir 路径信息
17
     */
18
    public function __construct($dir)
19
    {
20
        $this->databaseDir = $dir;
21
    }
22
23
    /**
24
     * 根据key名获取内容.
25
     *
26
     * @param string $name 缓存名
27
     */
28
    abstract public function _get($name);
29
30
    /**
31
     * 根据key名设置值.
32
     *
33
     * @param string       $name  缓存名
34
     * @param string|array $value 缓存值
35
     *
36
     * @return boolean;
0 ignored issues
show
Documentation introduced by
The doc-type boolean; could not be parsed: Expected "|" or "end of type", but got ";" at position 7. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
37
     */
38
    abstract public function _set($name, $value);
39
}
40