Files
XC_VM/src/Public/Controllers/Admin/RtmpMonitorController.php
T
Divarion_D 9665a5a2ab refactor: expand Rector to Streaming / Public\Controllers / Ministra (stage 2)
Widen the Rector config to the remaining class-based trees (Streaming,
Public\Controllers, Ministra), keeping the templates, procedural
front-controllers (Public/stream, Public/admin, Ministra/portal.php) and the
streaming hot-path bootstraps out. Also document the recurring dropped-parens
bug + the review grep in the config header.

The resulting 107-file pass (94 Public\Controllers, 11 Streaming, 2 Ministra)
was reviewed against the suite + PHPStan + the usual scans:
- No dropped-parens bug this time (the assignment-in-condition pattern didn't
  occur in these files).
- 6 locally-called private static helpers became instance methods
  (behaviour-preserving; all called via $this->, no static call sites); one
  unused private param dropped (FanoutConfig::desired $rSnapshot, call site
  updated).
- De Morgan / ternary / dead-code simplifications; two `$x = getById()`
  truthy-assignments folded into the condition (no comparison, safe).

PHPStan level 5 clean; suite 721 tests / 0 errors.
2026-09-13 19:21:44 +03:00

36 lines
952 B
PHP

<?php
namespace XcVm\Public\Controllers\Admin;
use XcVm\Core\Http\RequestManager;
use XcVm\Domain\Server\ServerRepository;
/**
* RtmpMonitorController — мониторинг RTMP.
*
* @renders Views/admin/rtmp_monitor.php
*
* @package XC_VM_Public_Controllers_Admin
* @author Divarion_D <https://github.com/Divarion-D>
* @copyright 2025-2026 Vateron Media
* @link https://github.com/Vateron-Media/XC_VM
* @license AGPL-3.0 https://www.gnu.org/licenses/agpl-3.0.html
*/
class RtmpMonitorController extends BaseAdminController {
public function index() {
$this->requirePermission();
global $rServers;
if (!RequestManager::has('server') || !isset($rServers[RequestManager::get('server')])) {
RequestManager::update('server', SERVER_ID);
}
$rRTMPInfo = ServerRepository::getRTMPStats(RequestManager::get('server'));
$this->setTitle('RTMP Monitor');
$this->render('rtmp_monitor', ['rRTMPInfo' => $rRTMPInfo]);
}
}