/home/vianto5/ceibaresidencial.mx/wp-content/plugins/query-monitor/classes
Edit: /home/vianto5/ceibaresidencial.mx/wp-content/plugins/query-monitor/classes/Frame_Registry.php (1456B)
*/
private static $index = array();
/**
* Ordered list of unique frames.
*
* @var list
*/
private static $frames = array();
/**
* Register a frame (without line number) and return its index.
*/
public static function register( QM_Data_Stack_Frame $frame ): int {
$key = $frame->id . "\0" . ( $frame->args ?? '' ) . "\0" . ( $frame->file ?? '' );
if ( isset( self::$index[ $key ] ) ) {
return self::$index[ $key ];
}
$count = count( self::$frames );
$lookup_frame = new QM_Data_Stack_Frame();
$lookup_frame->id = $frame->id;
$lookup_frame->file = $frame->file;
if ( $frame->args !== null ) {
$lookup_frame->args = $frame->args;
} else {
unset( $lookup_frame->args );
}
unset( $lookup_frame->line );
self::$frames[] = $lookup_frame;
self::$index[ $key ] = $count;
return $count;
}
public static function get_frame( int $index ): QM_Data_Stack_Frame {
return self::$frames[ $index ];
}
/**
* @return list
*/
public static function get_frames(): array {
return self::$frames;
}
}