Completed
Push — development ( 143149...212b7e )
by Alexander
03:21
created

CacheAdapterAbstract   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 32
ccs 5
cts 5
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
__construct() 0 1 ?
A getDriver() 0 4 1
A setDriver() 0 4 1
1
<?php
2
/**
3
 * Cache adapter and singleton functionality
4
 *
5
 * @file      CacheAdapterAbstract.php
6
 *
7
 * PHP version 5.4+
8
 *
9
 * @author    Alexander Yancharuk <alex at itvault dot info>
10
 * @copyright © 2012-2015 Alexander Yancharuk <alex at itvault at info>
11
 * @date      8/22/13 16:20
12
 * @license   The BSD 3-Clause License
13
 *            <https://tldrlegal.com/license/bsd-3-clause-license-(revised)>
14
 */
15
16
namespace Veles\Cache\Adapters;
17
18
use Traits\LazyCalls;
19
20
/**
21
 * Class CacheAdapterAbstract
22
 *
23
 * @author  Alexander Yancharuk <alex at itvault dot info>
24
 */
25
abstract class CacheAdapterAbstract
26
{
27
	/** @var  mixed */
28
	protected $driver;
29
30
	use LazyCalls;
31
32
	/**
33
	 * Driver initialization
34
	 */
35
	abstract protected function __construct();
36
37
	/**
38
	 * Get adapter driver
39
	 *
40
	 * @return mixed
41
	 */
42 1
	public function getDriver()
43
	{
44 1
		return $this->driver;
45
	}
46
47
	/**
48
	 * Set adapter driver
49
	 *
50
	 * @param mixed $driver
51
	 */
52 1
	public function setDriver($driver)
53
	{
54 1
		$this->driver = $driver;
55 1
	}
56
}
57