Completed
Push — master ( 0c53d4...debbec )
by David
09:08 queued 10s
created

Wordlift_Install::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * Installs: Install interface.
4
 *
5
 * The interface for Installations.
6
 *
7
 * @since      3.18.0
8
 * @package    Wordlift
9
 * @subpackage Wordlift/install
10
 */
11
12
/**
13
 * Define the {@link Wordlift_Install} interface.
14
 *
15
 * @since      3.18.0
16
 * @package    Wordlift
17
 * @subpackage Wordlift/install
18
 */
19
abstract class Wordlift_Install {
20
21
	/**
22
	 * A {@link Wordlift_Log_Service} instance.
23
	 *
24
	 * @since  3.18.0
25
	 * @access private
26
	 * @var \Wordlift_Log_Service $log A {@link Wordlift_Log_Service} instance.
27
	 */
28
	protected $log;
29
30
	protected static $version = '0.0.0';
31
32
	/**
33
	 * Wordlift_Install_Service constructor.
34
	 *
35
	 * @since 3.18.0
36
	 */
37
	public function __construct() {
38
39
		$this->log = Wordlift_Log_Service::get_logger( 'Wordlift_Install_' . str_replace( '.', '_', static::$version ) );
40
41
		$this->log->trace( 'Install package v' . static::$version . ' loaded.' );
42
	}
43
44
	/**
45
	 * Return the current version of the installation.
46
	 *
47
	 * @since 3.18.0
48
	 */
49
	public function get_version() {
50
		return static::$version;
51
	}
52
53
	abstract public function install();
54
55
}
56