SILENT KILLERPanel

Current Path: > home > transcarter > public_html > wp-content > plugins > query-monitor > classes


Operation   : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Software     : Apache
Server IP    : 198.54.126.42 | Your IP: 216.73.216.135
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/transcarter/public_html/wp-content/plugins/query-monitor/classes

NameTypeSizeLast ModifiedActions
Activation.php File 3038 bytes July 17 2025 21:05:45.
Backtrace.php File 14755 bytes July 17 2025 21:05:45.
CLI.php File 1568 bytes July 17 2025 21:05:45.
Collector.php File 8676 bytes July 17 2025 21:05:45.
Collector_Assets.php File 13804 bytes July 17 2025 21:05:45.
Collectors.php File 1923 bytes July 17 2025 21:05:45.
Component.php File 257 bytes July 17 2025 21:05:45.
DB.php File 1601 bytes July 17 2025 21:05:45.
Data.php File 1343 bytes July 17 2025 21:05:45.
DataCollector.php File 396 bytes July 17 2025 21:05:45.
Dispatcher.php File 5244 bytes July 17 2025 21:05:45.
Dispatchers.php File 1241 bytes July 17 2025 21:05:45.
Hook.php File 1706 bytes July 17 2025 21:05:45.
Output.php File 923 bytes July 17 2025 21:05:45.
PHP.php File 1397 bytes July 17 2025 21:05:45.
Plugin.php File 2400 bytes July 17 2025 21:05:45.
QM.php File 4443 bytes July 17 2025 21:05:45.
QueryMonitor.php File 8688 bytes July 17 2025 21:05:45.
Timer.php File 2923 bytes July 17 2025 21:05:45.
Util.php File 19534 bytes July 17 2025 21:05:45.
debug_bar.php File 1713 bytes July 17 2025 21:05:45.
debug_bar_panel.php File 1446 bytes July 17 2025 21:05:45.

Reading File: /home/transcarter/public_html/wp-content/plugins/query-monitor/classes/Collectors.php

<?php declare(strict_types = 1);
/**
 * Container for data collectors.
 *
 * @package query-monitor
 */

if ( ! class_exists( 'QM_Collectors' ) ) {
/**
 * @implements \IteratorAggregate<string, QM_Collector>
 */
class QM_Collectors implements IteratorAggregate {

	/**
	 * @var array<string, QM_Collector>
	 */
	private $items = array();

	/**
	 * @var boolean
	 */
	private $processed = false;

	/**
	 * @return ArrayIterator<string, QM_Collector>
	 */
	#[\ReturnTypeWillChange]
	public function getIterator() {
		return new ArrayIterator( $this->items );
	}

	/**
	 * @param QM_Collector $collector
	 * @return void
	 */
	public static function add( QM_Collector $collector ) {
		$collectors = self::init();

		$collector->set_up();

		$collectors->items[ $collector->id ] = $collector;
	}

	/**
	 * Fetches a collector instance.
	 *
	 * @param string $id The collector ID.
	 * @return QM_Collector|null The collector object.
	 */
	public static function get( $id ) {
		$collectors = self::init();

		return $collectors->items[ $id ] ?? null;
	}

	/**
	 * @return self
	 */
	public static function init() {
		static $instance;

		if ( ! $instance ) {
			$instance = new QM_Collectors();
		}

		return $instance;

	}

	/**
	 * @return void
	 */
	public function process() {
		if ( $this->processed ) {
			return;
		}

		foreach ( $this as $collector ) {
			$collector->tear_down();

			$timer = new QM_Timer();
			$timer->start();

			$collector->process();
			$collector->process_concerns();

			$collector->set_timer( $timer->stop() );
		}

		foreach ( $this as $collector ) {
			$collector->post_process();
		}

		$this->processed = true;
	}

	/**
	 * @return void
	 */
	public static function cease() {
		$collectors = self::init();

		$collectors->processed = true;

		/** @var QM_Collector $collector */
		foreach ( $collectors as $collector ) {
			$collector->tear_down();
			$collector->discard_data();
		}
	}
}
}

SILENT KILLER Tool