Elgg  Version master
deprecated-6.1.php
Go to the documentation of this file.
1 <?php
6 /* @deprecated 6.1 Use \Elgg\Cache\CompositeCache::CACHE_BLACK_HOLE */
8 /* @deprecated 6.1 Use \Elgg\Cache\CompositeCache::CACHE_RUNTIME */
10 /* @deprecated 6.1 Use \Elgg\Cache\CompositeCache::CACHE_FILESYSTEM */
12 /* @deprecated 6.1 Use \Elgg\Cache\CompositeCache::CACHE_PERSISTENT */
14 /* @deprecated 6.1 Use \Elgg\Cache\CompositeCache::CACHE_LOCALFILESYSTEM */
16 
23 function elgg_get_system_cache(): \Elgg\Cache\BaseCache {
24  elgg_deprecated_notice(__METHOD__ . ' has been deprecated.', '6.1');
25 
26  return _elgg_services()->systemCache->getCache();
27 }
28 
35 function elgg_reset_system_cache(): void {
36  elgg_deprecated_notice(__METHOD__ . ' has been deprecated.', '6.1');
37 
38  _elgg_services()->systemCache->clear();
39 }
40 
48 function elgg_is_system_cache_enabled(): bool {
49  elgg_deprecated_notice(__METHOD__ . ' has been deprecated.', '6.1');
50 
51  return _elgg_services()->systemCache->isEnabled();
52 }
53 
63 function elgg_enable_system_cache(): void {
64  elgg_deprecated_notice(__METHOD__ . ' has been deprecated.', '6.1');
65 
66  _elgg_services()->systemCache->enable();
67 }
68 
78 function elgg_disable_system_cache(): void {
79  elgg_deprecated_notice(__METHOD__ . ' has been deprecated.', '6.1');
80 
81  _elgg_services()->systemCache->disable();
82 }
83 
91 function elgg_is_simplecache_enabled(): bool {
92  elgg_deprecated_notice(__METHOD__ . ' has been deprecated.', '6.1');
93 
94  return _elgg_services()->simpleCache->isEnabled();
95 }
96 
104 function elgg_enable_simplecache(): void {
105  elgg_deprecated_notice(__METHOD__ . ' has been deprecated.', '6.1');
106 
107  _elgg_services()->simpleCache->enable();
108 }
109 
119 function elgg_disable_simplecache(): void {
120  elgg_deprecated_notice(__METHOD__ . ' has been deprecated.', '6.1');
121 
122  _elgg_services()->simpleCache->disable();
123 }
124 
138 function elgg_plugin_exists(string $plugin_id): bool {
139  elgg_deprecated_notice(__METHOD__ . ' has been deprecated. Use elgg_get_plugin_from_id().', '6.1');
140 
141  return _elgg_services()->plugins->get($plugin_id) instanceof \ElggPlugin;
142 }
$plugin_id
Remove all user and plugin settings from the give plugin ID.
Definition: remove.php:8
const ELGG_CACHE_BLACK_HOLE
Bundle all functions which have been deprecated in Elgg 6.1.
elgg_reset_system_cache()
Reset the system cache by deleting the caches.
elgg_plugin_exists(string $plugin_id)
Returns if a plugin exists in the system.
elgg_is_simplecache_enabled()
Is simple cache enabled.
elgg_disable_system_cache()
Disables the system disk cache.
const ELGG_CACHE_PERSISTENT
elgg_enable_simplecache()
Enables the simple cache.
elgg_disable_simplecache()
Disables the simple cache.
const ELGG_CACHE_FILESYSTEM
const ELGG_CACHE_LOCALFILESYSTEM
const ELGG_CACHE_RUNTIME
elgg_get_system_cache()
Returns an \Elgg\Cache\BaseCache object suitable for caching system information.
elgg_is_system_cache_enabled()
Is system cache enabled.
elgg_enable_system_cache()
Enables the system disk cache.
elgg_deprecated_notice(string $msg, string $dep_version)
Log a notice about deprecated use of a function, view, etc.
Definition: elgglib.php:117
_elgg_services()
Get the global service provider.
Definition: elgglib.php:353