Elgg
Version 3.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
Cache
ViewCacher.php
Go to the documentation of this file.
1
<?php
2
namespace
Elgg\Cache
;
3
4
use
Elgg\Includer
;
5
use
Elgg\Project\Paths
;
6
use
Elgg\ViewsService
;
7
use
Elgg\Config
;
8
12
class
ViewCacher
{
13
17
private
$views;
18
22
private
$config;
23
30
public
function
__construct
(
ViewsService
$views,
Config
$config) {
31
$this->views = $views;
32
$this->config = $config;
33
}
34
40
public
function
registerCoreViews
() {
41
if
($this->config->system_cache_loaded) {
42
return
;
43
}
44
45
// Core view files in /views
46
$this->views->registerPluginViews(
Paths::elgg
());
47
48
// Core view definitions in /engine/views.php
49
$file
=
Paths::elgg
() .
'engine/views.php'
;
50
if
(!is_file(
$file
)) {
51
return
;
52
}
53
54
$spec =
Includer::includeFile
(
$file
);
55
if
(is_array($spec)) {
56
$this->views->mergeViewsSpec($spec);
57
}
58
}
59
}
Paths
Elgg\Includer\includeFile
static includeFile($file)
Include a file with as little context as possible.
Definition:
Includer.php:18
Elgg\Cache\ViewCacher
Handles caching of views in the system cache.
Definition:
ViewCacher.php:12
$file
if(!array_key_exists($filename, $text_files)) $file
Definition:
plugin_text_file.php:29
Elgg\Project\Paths\elgg
static elgg()
Get the Elgg codebase path with "/".
Definition:
Paths.php:44
Elgg\Config
Definition:
Config.php:121
Elgg\Cache\ViewCacher\registerCoreViews
registerCoreViews()
Discover the core views if the system cache did not load.
Definition:
ViewCacher.php:40
Elgg\Config
Definition:
DatarootSettingMigrator.php:3
ViewsService
Elgg\ViewsService
WARNING: API IN FLUX.
Definition:
ViewsService.php:19
Elgg\Cache
Definition:
CacheCollection.php:3
Includer
Elgg\Cache\ViewCacher\__construct
__construct(ViewsService $views, Config $config)
Constructor.
Definition:
ViewCacher.php:30
Generated on Thu Jan 21 2021 00:00:20 for Elgg by
1.8.11