Passed
Push — master ( a82a12...289cbe )
by Anton
03:10
created

Filemanager   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 0
Metric Value
dl 0
loc 56
rs 10
c 0
b 0
f 0
wmc 6
lcom 0
cbo 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A openAddons() 0 4 1
A openLanguages() 0 4 1
A openTemplates() 0 4 1
A openUploads() 0 4 1
A get() 0 4 1
A getLoader() 0 4 1
1
<?php
2
3
/**
4
 * @package Cadmium\System\Modules\Filemanager
5
 * @author Anton Romanov
6
 * @copyright Copyright (c) 2015-2017, Anton Romanov
7
 * @link http://cadmium-cms.com
8
 */
9
10
namespace Modules {
11
12
	abstract class Filemanager {
13
14
		/**
15
		 * Get a container object for a path located within the addons directory
16
		 */
17
18
		public static function openAddons(string $path = '') : Filemanager\Container\Addons {
19
20
			return new Filemanager\Container\Addons($path);
21
		}
22
23
		/**
24
		 * Get a container object for a path located within the languages directory
25
		 */
26
27
		public static function openLanguages(string $path = '') : Filemanager\Container\Languages {
28
29
			return new Filemanager\Container\Languages($path);
30
		}
31
32
		/**
33
		 * Get a container object for a path located within the templates directory
34
		 */
35
36
		public static function openTemplates(string $path = '') : Filemanager\Container\Templates {
37
38
			return new Filemanager\Container\Templates($path);
39
		}
40
41
		/**
42
		 * Get a container object for a path located within the uploads directory
43
		 */
44
45
		public static function openUploads(string $path = '') : Filemanager\Container\Uploads {
46
47
			return new Filemanager\Container\Uploads($path);
48
		}
49
50
		/**
51
		 * Get a directory/file entity object
52
		 */
53
54
		public static function get(Filemanager\Utils\Container $parent, string $name = '') : Filemanager\Utils\Entity {
55
56
			return new Filemanager\Utils\Entity($parent, $name);
57
		}
58
59
		/**
60
		 * Get a loader object for a given parent
61
		 */
62
63
		public static function getLoader(Filemanager\Utils\Container $parent) : Filemanager\Utils\Loader {
64
65
			return new Filemanager\Utils\Loader($parent);
66
		}
67
	}
68
}
69