yii\mongodb\file\Cursor::current PHP Method

current() public method

Return the current element This method is required by the interface [[\Iterator]].
public current ( ) : mixed
return mixed current row
    public function current()
    {
        $value = parent::current();
        if (!isset($value['file'])) {
            $value['file'] = $this->collection->createDownload(array_intersect_key($value, ['_id' => true, 'filename' => true, 'length' => true, 'chunkSize' => true]));
        }
        return $value;
    }