/home/altere25/labratnyc.com/wp-content/plugins/query-monitor/classes
NameSizeModeActions
Activation.php30380644editdlrm
ArrayAccess.php11050644editdlrm
Backtrace.php228870644editdlrm
Backtrace_Frame.php8700644editdlrm
CLI.php15680644editdlrm
Collector.php87070644editdlrm
Collectors.php34450644editdlrm
Collector_Assets.php145000644editdlrm
Component.php38660644editdlrm
Component_Altis_Vendor.php3560644editdlrm
Component_Core.php2630644editdlrm
Component_Dropin.php3460644editdlrm
Component_MU_Plugin.php3330644editdlrm
Component_MU_Vendor.php3420644editdlrm
Component_Other.php1700644editdlrm
Component_PHP.php2210644editdlrm
Component_Plugin.php3240644editdlrm
Component_Stylesheet.php3410644editdlrm
Component_Template.php2780644editdlrm
Component_Unknown.php8660644editdlrm
Component_VIP_Plugin.php3460644editdlrm
Data.php4280644editdlrm
DataCollector.php3960644editdlrm
DB.php15460644editdlrm
debug_bar.php17130644editdlrm
debug_bar_panel.php14460644editdlrm
Deprecated_Argument_Run.php10350644editdlrm
Deprecated_Class_Run.php9660644editdlrm
Deprecated_Constructor_Run.php11440644editdlrm
Deprecated_File_Included.php10950644editdlrm
Deprecated_Function_Run.php9830644editdlrm
Deprecated_Hook_Run.php10980644editdlrm
Dispatcher.php50970644editdlrm
Dispatchers.php12410644editdlrm
Doing_It_Wrong_Run.php8920644editdlrm
Frame_Registry.php14560644editdlrm
Hook.php13790644editdlrm
Output.php9230644editdlrm
PHP.php13970644editdlrm
Plugin.php24000644editdlrm
QM.php44510644editdlrm
QueryMonitor.php87050644editdlrm
Timer.php33260644editdlrm
Util.php199010644editdlrm
Wrong.php8220644editdlrm
Edit: /home/altere25/labratnyc.com/wp-content/plugins/query-monitor/classes/Collectors.php (3445B)
*/ class QM_Collectors implements IteratorAggregate { /** * @var array */ private $items = array(); /** * @var boolean */ private $processed = false; /** * @return ArrayIterator */ #[\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(); add_action( 'init', array( $instance, 'cease_if_unsupported' ), 0 ); } return $instance; } /** * Ceases data collection if the current request is not one where QM will output. */ public function cease_if_unsupported() : void { if ( self::request_supported() ) { return; } do_action( 'qm/cease' ); } /** * Determines whether the current request supports data collection. */ public static function request_supported() : bool { // Don't collect during a Customizer preview request: if ( function_exists( 'is_customize_preview' ) && is_customize_preview() ) { return false; } // Don't collect during an iframed request, eg. the plugin info modal, an upgrader action, or the Customizer: if ( defined( 'IFRAME_REQUEST' ) && IFRAME_REQUEST ) { return false; } // Don't collect inside the Site Editor: if ( isset( $_SERVER['SCRIPT_NAME'] ) && '/wp-admin/site-editor.php' === $_SERVER['SCRIPT_NAME'] ) { return false; } // Don't collect on the interim login screen: // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( ! empty( $_GET['interim-login'] ) ) { return false; } // Don't collect on the Gutenberg site preview: // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( ! empty( $_GET['wp_site_preview'] ) ) { return false; } // Don't collect in the Elementor preview iframe // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( ! empty( $_GET['elementor-preview'] ) ) { return false; } return true; } /** * @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(); } } } }