diff --git a/src/Entity/Browser/Menu/Help/About.php b/src/Entity/Browser/Menu/Help/About.php index 751558d6..02f7666a 100644 --- a/src/Entity/Browser/Menu/Help/About.php +++ b/src/Entity/Browser/Menu/Help/About.php @@ -37,15 +37,10 @@ class About public const DIALOG_FORMAT_SECONDARY_MARKUP_APP_SRC_HREF = 'https://github.com/YGGverse/Yoda'; public const DIALOG_FORMAT_SECONDARY_MARKUP_PHP_SRC_NAME = 'PHP'; - public const DIALOG_FORMAT_SECONDARY_MARKUP_PHP_SRC_INFO = 'Hypertext Preprocessor'; - public const DIALOG_FORMAT_SECONDARY_MARKUP_PHP_SRC_META = 'version: %d.%d.%d'; + public const DIALOG_FORMAT_SECONDARY_MARKUP_PHP_SRC_INFO = 'The Hypertext Preprocessor'; + public const DIALOG_FORMAT_SECONDARY_MARKUP_PHP_SRC_META = '%s'; public const DIALOG_FORMAT_SECONDARY_MARKUP_PHP_SRC_HREF = 'https://github.com/php/php-src'; - public const DIALOG_FORMAT_SECONDARY_MARKUP_PHP_GTK_NAME = 'PHP-GTK'; - public const DIALOG_FORMAT_SECONDARY_MARKUP_PHP_GTK_INFO = 'Bind of GTK 3 to create desktop applications with PHP'; - public const DIALOG_FORMAT_SECONDARY_MARKUP_PHP_GTK_META = 'version: %s'; - public const DIALOG_FORMAT_SECONDARY_MARKUP_PHP_GTK_HREF = 'https://github.com/scorninpc/php-gtk3'; - public const DIALOG_FORMAT_SECONDARY_MARKUP_LIB_GTK_NAME = 'GTK'; public const DIALOG_FORMAT_SECONDARY_MARKUP_LIB_GTK_INFO = 'Free and open-source cross-platform widget toolkit'; public const DIALOG_FORMAT_SECONDARY_MARKUP_LIB_GTK_META = 'version: %d.%d.%d'; @@ -97,6 +92,24 @@ class About ); } + // Get phpinfo + $phpinfo = []; + + foreach (get_loaded_extensions() as $extension) + { + $phpinfo[] = sprintf( + '%s: %s', + mb_strtolower( + $extension + ), + strval( + phpversion( + $extension + ) + ) + ); + } + // Build dialog template $dialog->format_secondary_markup( implode( @@ -126,26 +139,9 @@ class About _($this::DIALOG_FORMAT_SECONDARY_MARKUP_PHP_SRC_INFO), sprintf( _($this::DIALOG_FORMAT_SECONDARY_MARKUP_PHP_SRC_META), - PHP_MAJOR_VERSION, - PHP_MINOR_VERSION, - PHP_RELEASE_VERSION - ), - null, - // PHP-GTK - sprintf( - _($this::DIALOG_FORMAT_SECONDARY_MARKUP_PHP_GTK_NAME), - _($this::DIALOG_FORMAT_SECONDARY_MARKUP_PHP_GTK_HREF), - _($this::DIALOG_FORMAT_SECONDARY_MARKUP_PHP_GTK_HREF) - ), - _($this::DIALOG_FORMAT_SECONDARY_MARKUP_PHP_GTK_INFO), - sprintf( - _($this::DIALOG_FORMAT_SECONDARY_MARKUP_PHP_GTK_META), - strval( - phpversion( - basename( - $this::DIALOG_FORMAT_SECONDARY_MARKUP_PHP_GTK_HREF - ) - ) + implode( + PHP_EOL, + $phpinfo ) ), null,