Ubiquity
2.5.2
php rapid development framework
Loading...
Searching...
No Matches
Framework.php
Go to the documentation of this file.
1
<?php
2
11
namespace
Ubiquity\core
;
12
13
use
Ubiquity\assets\AssetsManager
;
14
use
Ubiquity\cache\CacheManager
;
15
use
Ubiquity\contents\normalizers\NormalizersManager
;
16
use
Ubiquity\controllers\Router
;
17
use
Ubiquity\controllers\Startup
;
18
use
Ubiquity\orm\OrmUtils
;
19
use
Ubiquity\translation\TranslatorManager
;
20
use
Ubiquity\utils\http\UCookie
;
21
use
Ubiquity\utils\http\URequest
;
22
use
Ubiquity\utils\http\USession
;
23
24
class
Framework
{
25
public
const
VERSION
=
'2.5.2'
;
26
31
public
static
function
getVersion
(): string {
32
return self::
VERSION
;
33
}
34
39
public
static
function
getEnv
(): string {
40
return
Startup
::getConfig()[
'app.env'
] ??
'dev'
;
41
}
42
47
public
static
function
getController
(): ?string {
48
return
Startup
::getController();
49
}
50
55
public
static
function
getAction
(): ?string {
56
return
Startup
::getAction();
57
}
58
63
public
static
function
getUrl
(): string {
64
return \implode(
'/'
,
Startup
::$urlParts);
65
}
66
67
public
static
function
getRouter
():
Router
{
68
return new
Router
();
69
}
70
71
public
static
function
getORM
():
OrmUtils
{
72
return new
OrmUtils
();
73
}
74
75
public
static
function
getRequest
():
URequest
{
76
return new
URequest
();
77
}
78
79
public
static
function
getSession
():
USession
{
80
return new
USession
();
81
}
82
83
public
static
function
getCookies
():
UCookie
{
84
return new
UCookie
();
85
}
86
87
public
static
function
getTranslator
():
TranslatorManager
{
88
return new
TranslatorManager
();
89
}
90
91
public
static
function
getNormalizer
():
NormalizersManager
{
92
return new
NormalizersManager
();
93
}
94
95
public
static
function
hasAdmin
(): bool {
96
return \class_exists(
"controllers\Admin"
);
97
}
98
99
public
static
function
getAssets
():
AssetsManager
{
100
return new
AssetsManager
();
101
}
102
103
public
static
function
getCacheSystem
(): string {
104
return \get_class(
CacheManager
::$cache);
105
}
106
107
public
static
function
getAnnotationsEngine
(): string {
108
return \get_class(
CacheManager
::getAnnotationsEngineInstance());
109
}
110
}
111
Ubiquity\assets\AssetsManager
Assets manager for css and js inclusions in templates.
Definition
AssetsManager.php:21
Ubiquity\cache\CacheManager
Manager for caches (Router, Rest, models).
Definition
CacheManager.php:28
Ubiquity\contents\normalizers\NormalizersManager
Normalize objects and arrays of objects.
Definition
NormalizersManager.php:19
Ubiquity\controllers\Router
Router manager.
Definition
Router.php:22
Ubiquity\controllers\Startup
Starts the framework.
Definition
Startup.php:19
Ubiquity\core\Framework
Definition
Framework.php:24
Ubiquity\core\Framework\getController
static getController()
Returns the active controller class name.
Definition
Framework.php:47
Ubiquity\core\Framework\getVersion
static getVersion()
Returns framework version.
Definition
Framework.php:31
Ubiquity\core\Framework\getEnv
static getEnv()
Returns the app.env value in config cache.
Definition
Framework.php:39
Ubiquity\core\Framework\getCookies
static getCookies()
Definition
Framework.php:83
Ubiquity\core\Framework\getAnnotationsEngine
static getAnnotationsEngine()
Definition
Framework.php:107
Ubiquity\core\Framework\getUrl
static getUrl()
Gets the active URL.
Definition
Framework.php:63
Ubiquity\core\Framework\getAssets
static getAssets()
Definition
Framework.php:99
Ubiquity\core\Framework\getRouter
static getRouter()
Definition
Framework.php:67
Ubiquity\core\Framework\getRequest
static getRequest()
Definition
Framework.php:75
Ubiquity\core\Framework\hasAdmin
static hasAdmin()
Definition
Framework.php:95
Ubiquity\core\Framework\getSession
static getSession()
Definition
Framework.php:79
Ubiquity\core\Framework\getTranslator
static getTranslator()
Definition
Framework.php:87
Ubiquity\core\Framework\getCacheSystem
static getCacheSystem()
Definition
Framework.php:103
Ubiquity\core\Framework\getORM
static getORM()
Definition
Framework.php:71
Ubiquity\core\Framework\VERSION
const VERSION
Definition
Framework.php:25
Ubiquity\core\Framework\getAction
static getAction()
Returns the active action.
Definition
Framework.php:55
Ubiquity\core\Framework\getNormalizer
static getNormalizer()
Definition
Framework.php:91
Ubiquity\orm\OrmUtils
Object/relational mapping utilities.
Definition
OrmUtils.php:17
Ubiquity\translation\TranslatorManager
Manage translations.
Definition
TranslatorManager.php:20
Ubiquity\utils\http\UCookie
Http Cookies utilities Ubiquity\utils\http$UCookie This class is part of Ubiquity.
Definition
UCookie.php:16
Ubiquity\utils\http\URequest
Http Request utilities, wrapper for accessing to $_GET, $_POST and php://input.
Definition
URequest.php:18
Ubiquity\utils\http\USession
Http Session utilities This class is part of Ubiquity.
Definition
USession.php:16
Ubiquity\core
Ubiquity\core This class is part of Ubiquity.
Definition
Framework.php:11
C:
Users
myadd
Documents
GitHub
ubiquity-doc-api
vendor
phpmv
ubiquity
src
Ubiquity
core
Framework.php
Generated on Sun Dec 10 2023 15:04:20 for
Ubiquity
by
doxygen
1.9.8