protected function extractFileName($file)
    {
        if ($file instanceof UploadedFile) {
            return $file->tempName;
        } elseif (is_string($file)) {
            if (file_exists($file)) {
                return $file;
            }
            throw new InvalidParamException("File '{$file}' does not exist.");
        }

        throw new InvalidParamException('Unsupported type of "file" attribute.');
    }
protected function extractFileName($file)
    {
        if ($file instanceof UploadedFile) {
            return $file->tempName;
        } elseif (is_string($file)) {
            if (file_exists($file)) {
                return $file;
            }
            throw new InvalidParamException("File '{$file}' does not exist.");
        }

        throw new InvalidParamException('Unsupported type of "file" attribute.');
    }
protected function extractFileName ( $ file ) { if ( $ file instanceof UploadedFile ) { return $ file -> tempName ; } elseif ( is_string ( $ file ) ) { if ( file_exists ( $ file ) ) { return $ file ; } throw new InvalidParamException ( "File '{$file}' does not exist." ) ; } throw new InvalidParamException ( 'Unsupported type of "file" attribute.' ) ; }
Extracts filename from given raw file value.
@param mixed $file raw file value.
@return string file name.
@throws \yii\base\InvalidParamException on invalid file value.
Extracts filename from given raw file value .