yii\mongodb\file\Cursor::current PHP 메소드

current() 공개 메소드

Return the current element This method is required by the interface [[\Iterator]].
public current ( ) : mixed
리턴 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;
    }