Completed
Push — master ( 561c31...ac170c )
by Nazar
04:13
created

Index::__get()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
rs 9.4285
cc 2
eloc 5
nc 2
nop 1
1
<?php
2
/**
3
 * @package   CleverStyle CMS
4
 * @author    Nazar Mokrynskyi <[email protected]>
5
 * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi
6
 * @license   MIT License, see license.txt
7
 */
8
namespace cs;
9
10
/**
11
 * @deprecated Use `cs\App` instead
12
 */
13
class Index {
14
	use
15
		Singleton;
16
17
	/**
18
	 * Getter for `controller_path` property (no other properties supported currently)
19
	 *
20
	 * @param string $property
21
	 *
22
	 * @return false|string[]
23
	 */
24
	function __get ($property) {
25
		switch ($property) {
26
			case 'controller_path';
27
				return App::instance()->controller_path;
28
		}
29
		return false;
30
	}
31
	/**
32
	 * Executes plugins processing, blocks and module page generation
33
	 *
34
	 * @deprecated use `cs\App::execute()` instead
35
	 *
36
	 * @throws ExitException
37
	 */
38
	function __finish () {
39
		App::instance()->execute();
40
	}
41
}
42