-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathICms.php
99 lines (86 loc) · 2.22 KB
/
ICms.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php declare(strict_types = 1);
namespace Dms\Core;
use Dms\Core\Auth\IAuthSystem;
use Dms\Core\Auth\IPermission;
use Dms\Core\Event\IEventDispatcher;
use Dms\Core\Ioc\IIocContainer;
use Dms\Core\Language\ILanguageProvider;
use Dms\Core\Package\IPackage;
use Dms\Core\Package\PackageNotFoundException;
use Psr\Cache\CacheItemPoolInterface;
/**
* The interface for a CMS.
*
* @author Elliot Levin <[email protected]>
*/
interface ICms
{
const VERSION = '0.1.0-dev';
/**
* Get the names of the installed packages within this cms.
*
* @return string[]
*/
public function getPackageNames() : array;
/**
* Loads the installed packages.
*
* @return IPackage[]
*/
public function loadPackages() : array;
/**
* Returns whether a package with the supplied name is installed.
*
* @param string $name
*
* @return bool
*/
public function hasPackage(string $name) : bool;
/**
* Loads the package with the supplied name.
*
* @param string $name
*
* @return IPackage
* @throws PackageNotFoundException If the package is not installed
*/
public function loadPackage(string $name) : IPackage;
/**
* Gets the authentication system for the cms.
*
* @return IAuthSystem
*/
public function getAuth() : IAuthSystem;
/**
* Gets the language provider for the cms.
*
* @return ILanguageProvider
*/
public function getLang() : ILanguageProvider;
/**
* Gets the cache for the cms.
*
* @return CacheItemPoolInterface
*/
public function getCache() : CacheItemPoolInterface;
/**
* Gets the event dispatcher used within the cms instance.
*
* @return IEventDispatcher
*/
public function getEventDispatcher() : IEventDispatcher;
/**
* Gets the inversion of control container used within this cms instance.
*
* @return IIocContainer
*/
public function getIocContainer() : IIocContainer;
/**
* Loads the namespaced permissions.
*
* NOTE: this will load all the packages and all the modules.
*
* @return IPermission[]
*/
public function loadPermissions() : array;
}