for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare( strict_types = 1 );
namespace ModernTimeline;
class ModernTimelineSetup {
public static function onExtensionFunction(): void {
self::doSmwCheck();
$GLOBALS['smwgResultFormats']['moderntimeline'] = ModernTimelinePrinter::class;
}
private static function doSmwCheck(): void {
if ( !defined( 'SMW_VERSION' ) ) {
if ( PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg' ) {
die( "\nThe 'Modern Timeline' extension requires 'Semantic MediaWiki' to be installed and enabled.\n" );
exit
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.
die(
'<b>Error:</b> The <a href="https://professional.wiki/en/extension/modern-timeline">Modern Timeline</a> ' .
'extension requires <a href="https://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki">Semantic MediaWiki</a> to be ' .
'installed and enabled.<br />'
);
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.