public static function process_queue() { foreach (self::$write_queue as $fn) { if ($fn instanceof QueryRecord) { $fn->update(); } else { $fn(); } } }