Файловый менеджер - Редактировать - /var/www/html/mediawiki-1.43.1/extensions/LiveChat/includes/Storage.php
Ðазад
<?php namespace LiveChat; use MediaWiki\MediaWikiServices; use Workerman\Connection\ConnectionInterface; class Storage extends Worker { /** * @var array */ protected $providers = []; /** @inheritDoc */ public function __construct( string $socket_name = '', array $context_option = [] ) { if ( !$socket_name ) { $socket_name = self::getConfigValue( 'LiveChatStorageSocketName' ); } parent::__construct( $socket_name, $context_option ); $this->name = 'LiveChat Storage'; } public function run() { MediaWikiServices::getInstance()->getHookContainer()->run( 'LiveChatStorageInit', [ &$this->providers ] ); parent::run(); } /** * @param ConnectionInterface $connection * @param string $command * @param array $data */ protected function onCommand( ConnectionInterface $connection, string $command, array $data ) { parent::onCommand( $connection, $command, $data ); $message = $data['message'] ?? null; if ( !$message ) { self::debugLog( __FUNCTION__, 'ERROR: Message is empty' ); return; } $providerName = $message['providerName'] ?? null; if ( !$providerName ) { self::debugLog( __FUNCTION__, 'ERROR: Provider name is empty' ); return; } $className = $this->providers[$providerName] ?? null; if ( !$className ) { self::debugLog( __FUNCTION__, 'ERROR', 'Unknown provider for name', $providerName ); return; } call_user_func( [ $className, 'onCommand' ], $connection, $providerName, $command, $data ); } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка