Passed
Pull Request — master (#19)
by Anton
03:33
created

Addons::getLoader()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @package Cadmium\System\Modules\Extend
5
 * @author Anton Romanov
6
 * @copyright Copyright (c) 2015-2017, Anton Romanov
7
 * @link http://cadmium-cms.com
8
 */
9
10
namespace Modules\Extend\Utils\Extension {
11
12
	use Modules\Extend;
13
14
	abstract class Addons extends Extend\Utils\Extension {
15
16
		/**
17
		 * Get a loader object
18
		 */
19
20
		public static function getLoader(bool $load_all = true) : Extend\Utils\Loader\Addons {
21
22
			return new static::$loader_class($load_all);
23
		}
24
25
		/**
26
		 * Initialize the add-ons list
27
		 */
28
29
		public static function init() {
30
31
			static::$loader = new static::$loader_class(false);
32
		}
33
	}
34
}
35