HEX
Server: Apache/2.4.46 (Ubuntu)
System: Linux localhost 5.11.0-49-generic #55-Ubuntu SMP Wed Jan 12 17:36:34 UTC 2022 x86_64
User: root (0)
PHP: 7.4.16
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/dooblo.cccinfotech.com/wp-content/plugins/query-monitor/classes/QM.php
<?php declare(strict_types = 1);
/**
 * A convenience class for wrapping certain user-facing functionality.
 *
 * @package query-monitor
 */

class QM {

	/**
	 * @param string $message
	 * @param array<string, mixed> $context
	 * @return void
	 */
	public static function emergency( $message, array $context = array() ) {
		/**
		 * Fires when an `emergency` level message is logged.
		 *
		 * @since 3.1.0
		 *
		 * @param mixed $message The message or data to log.
		 * @param array $context The context passed.
		 */
		do_action( 'qm/emergency', $message, $context );
	}

	/**
	 * @param string $message
	 * @param array<string, mixed> $context
	 * @return void
	 */
	public static function alert( $message, array $context = array() ) {
		/**
		 * Fires when an `alert` level message is logged.
		 *
		 * @since 3.1.0
		 *
		 * @param mixed $message The message or data to log.
		 * @param array $context The context passed.
		 */
		do_action( 'qm/alert', $message, $context );
	}

	/**
	 * @param string $message
	 * @param array<string, mixed> $context
	 * @return void
	 */
	public static function critical( $message, array $context = array() ) {
		/**
		 * Fires when a `critical` level message is logged.
		 *
		 * @since 3.1.0
		 *
		 * @param mixed $message The message or data to log.
		 * @param array $context The context passed.
		 */
		do_action( 'qm/critical', $message, $context );
	}

	/**
	 * @param string $message
	 * @param array<string, mixed> $context
	 * @return void
	 */
	public static function error( $message, array $context = array() ) {
		/**
		 * Fires when an `error` level message is logged.
		 *
		 * @since 3.1.0
		 *
		 * @param mixed $message The message or data to log.
		 * @param array $context The context passed.
		 */
		do_action( 'qm/error', $message, $context );
	}

	/**
	 * @param string $message
	 * @param array<string, mixed> $context
	 * @return void
	 */
	public static function warning( $message, array $context = array() ) {
		/**
		 * Fires when a `warning` level message is logged.
		 *
		 * @since 3.1.0
		 *
		 * @param mixed $message The message or data to log.
		 * @param array $context The context passed.
		 */
		do_action( 'qm/warning', $message, $context );
	}

	/**
	 * @param string $message
	 * @param array<string, mixed> $context
	 * @return void
	 */
	public static function notice( $message, array $context = array() ) {
		/**
		 * Fires when a `notice` level message is logged.
		 *
		 * @since 3.1.0
		 *
		 * @param mixed $message The message or data to log.
		 * @param array $context The context passed.
		 */
		do_action( 'qm/notice', $message, $context );
	}

	/**
	 * @param string $message
	 * @param array<string, mixed> $context
	 * @return void
	 */
	public static function info( $message, array $context = array() ) {
		/**
		 * Fires when an `info` level message is logged.
		 *
		 * @since 3.1.0
		 *
		 * @param mixed $message The message or data to log.
		 * @param array $context The context passed.
		 */
		do_action( 'qm/info', $message, $context );
	}

	/**
	 * @param string $message
	 * @param array<string, mixed> $context
	 * @return void
	 */
	public static function debug( $message, array $context = array() ) {
		/**
		 * Fires when a `debug` level message is logged.
		 *
		 * @since 3.1.0
		 *
		 * @param mixed $message The message or data to log.
		 * @param array $context The context passed.
		 */
		do_action( 'qm/debug', $message, $context );
	}

	/**
	 * @param mixed $assertion
	 * @param string $message
	 * @param ?mixed $value
	 * @return void
	 */
	public static function assert( $assertion, string $message = '', $value = null ) {
		/**
		 * Fires when an assertion is performed.
		 *
		 * @since x.y.z
		 *
		 * @param mixed  $assertion The assertion result, ideally something that evaluates to true.
		 * @param string $message   The assertion message. May be an empty string.
		 * @param mixed  $value     Optional. A value to show along with the message when the assertion fails.
		 */
		do_action( 'qm/assert', $assertion, $message, $value );
	}

	/**
	 * @param string $level
	 * @param string $message
	 * @param array<string, mixed> $context
	 * @phpstan-param QM_Collector_Logger::* $level
	 * @return void
	 */
	public static function log( $level, $message, array $context = array() ) {
		/** @var QM_Collector_Logger */
		$logger = QM_Collectors::get( 'logger' );
		$logger->log( $level, $message, $context );
	}
}