public function explain()
    {
        $optionNames = [
            'allowPartialResults',
            'batchSize',
            'cursorType',
            'limit',
            'maxTimeMS',
            'noCursorTimeout',
            'projection',
            'skip',
            'sort',
        ];

        $options = $this->getOptions($optionNames);

        $command = [
            'explain' => [
                'find' => $this->collection->getCollectionName(),
                'filter' => TypeConverter::fromLegacy($this->query),
            ] + $options,
        ];

        $explained = TypeConverter::toLegacy(iterator_to_array($this->db->command($command))[0]);
        unset($explained['ok']);

        return $explained;
    }