Elgg  Version master
Variables
requirements.php File Reference

Go to the source code of this file.

Variables

 $icon_ok = elgg_view_icon('check')
 
 $icon_warning = elgg_view_icon('exclamation-triangle')
 
 $icon_error = elgg_view_icon('times')
 
 $view_module
 
 $icon = $icon_ok
 
 $title = elgg_echo('admin:server:label:php_version')
 
 $value = PHP_VERSION
 
 $subtext = ''
 
 if (version_compare(PHP_VERSION, \ElggInstaller::PHP_MINIMAL_VERSION, '<'))
 
 $extensions = get_loaded_extensions()
 
 $requiredExtensions
 
foreach($requiredExtensions as $extension) $recommendedExtensions
 
foreach($recommendedExtensions as $extension) if(empty(ini_get('session.gc_probability'))||empty(ini_get('session.gc_divisor'))) $db = _elgg_services()->db
 
 $version = $db->getServerVersion()
 
 $min_version = $db->isMariaDB() ? \ElggInstaller::MARIADB_MINIMAL_VERSION : \ElggInstaller::MYSQL_MINIMAL_VERSION
 
if($db->isMariaDB()) elseif($db->isMySQL()) else
 
 if (!in_array( $server,[ 'mysql', 'mariadb'])||version_compare( $version ?:'0', $min_version, '<'))
 
 $client_parts = explode('\\', get_class($db->getConnection(DbConfig::READ_WRITE)->getDriver()))
 
 $client = implode(' ', $client_parts)
 
 $url
 
 $tester = new RewriteTester()
 

Variable Documentation

◆ $client

$client = implode(' ', $client_parts)

Definition at line 119 of file requirements.php.

◆ $client_parts

$client_parts = explode('\\', get_class($db->getConnection(DbConfig::READ_WRITE)->getDriver()))

Definition at line 117 of file requirements.php.

◆ $db

foreach ( $recommendedExtensions as $extension) if (empty(ini_get( 'session.gc_probability'))||empty(ini_get( 'session.gc_divisor'))) $db = _elgg_services()->db

Definition at line 94 of file requirements.php.

◆ $extensions

$extensions = get_loaded_extensions()

Definition at line 44 of file requirements.php.

◆ $icon

$icon = $icon_ok

Definition at line 31 of file requirements.php.

◆ $icon_error

$icon_error = elgg_view_icon('times')

Definition at line 15 of file requirements.php.

◆ $icon_ok

$icon_ok = elgg_view_icon('check')

Definition at line 13 of file requirements.php.

◆ $icon_warning

$icon_warning = elgg_view_icon('exclamation-triangle')

Definition at line 14 of file requirements.php.

◆ $min_version

Definition at line 96 of file requirements.php.

◆ $recommendedExtensions

foreach ( $requiredExtensions as $extension) $recommendedExtensions
Initial value:
= [
'mbstring',
]

Definition at line 68 of file requirements.php.

◆ $requiredExtensions

$requiredExtensions
Initial value:
= [
'pdo_mysql',
'json',
'xml',
'gd',
'intl',
]

Definition at line 45 of file requirements.php.

◆ $subtext

$subtext = ''

Definition at line 34 of file requirements.php.

◆ $tester

$tester = new RewriteTester()

Definition at line 137 of file requirements.php.

◆ $title

$title = elgg_echo('admin:server:label:php_version')

Definition at line 32 of file requirements.php.

◆ $url

$url
Initial value:
= elgg_http_add_url_query_elements(Request::REWRITE_TEST_TOKEN, [
Request::REWRITE_TEST_TOKEN => 1,
])
elgg_http_add_url_query_elements(string $url, array $elements)
Sets elements in a URL's query string.
Definition: elgglib.php:183

Definition at line 132 of file requirements.php.

◆ $value

$value = PHP_VERSION

Definition at line 33 of file requirements.php.

◆ $version

$version = $db->getServerVersion()
Examples
/root/Elgg/engine/lib/views.php.

Definition at line 95 of file requirements.php.

◆ $view_module

$view_module
Initial value:
= function($icon, $title, $value = '', $subtext = '') {
$body = elgg_format_element('strong', [], $title);
$body .= elgg_format_element('span', ['class' => 'mlm'], $value);
}
$body .= elgg_format_element('div', ['class' => 'elgg-subtext'], $subtext);
}
return elgg_view_image_block($icon, $body, ['class' => 'elgg-admin-information-row']);
}
$body
Definition: useradd.php:55
$value
$subtext
$icon
$title
elgg_is_empty($value)
Check if a value isn't empty, but allow 0 and '0'.
Definition: input.php:176
elgg_view_image_block(string $image, string $body, array $vars=[])
Wrapper function for the image block display pattern.
Definition: views.php:898
elgg_format_element(string $tag_name, array $attributes=[], string $text='', array $options=[])
Format an HTML element.
Definition: output.php:145

Definition at line 17 of file requirements.php.

◆ else

if ( $db->isMariaDB()) elseif ( $db->isMySQL()) else
Initial value:
{
$server = substr(strrchr($db->getConnection(DbConfig::READ_WRITE)->getDatabasePlatform()::class, '\\'), 1)
foreach($recommendedExtensions as $extension) if(empty(ini_get('session.gc_probability'))||empty(ini_get('session.gc_divisor'))) $db

Definition at line 102 of file requirements.php.

◆ if [1/2]

if(!in_array($server, ['mysql', 'mariadb'])||version_compare($version ?:'0', $min_version, '<')) ( in_array $server,[ 'mysql', 'mariadb'])||version_compare( $version ?:'0', $min_version, '<')

Definition at line 109 of file requirements.php.

◆ if [2/2]

if(! $tester->runRewriteTest($url)) ( version_compare(PHP_VERSION, \ElggInstaller::PHP_MINIMAL_VERSION, '<')  )

Definition at line 36 of file requirements.php.