TopResult.php in MongoDB 8.2
Namespace
Drupal\mongodb_watchdog\ControllerFile
modules/mongodb_watchdog/src/Controller/TopResult.phpView source
<?php
namespace Drupal\mongodb_watchdog\Controller;
use MongoDB\BSON\Unserializable;
/**
 * Class TopResult is a value object holding the Top aggregation results.
 */
final class TopResult implements Unserializable {
  /**
   * The number of hits on the grouped URL.
   *
   * @var int
   */
  public $count;
  /**
   * The URL on which the count of hits is grouped.
   *
   * @var string
   */
  public $uri;
  /**
   * {@inheritDoc}
   */
  public function bsonUnserialize(array $data) {
    $this->uri = $data['_id'];
    $this->count = $data['count'];
  }
} 
      