diff --git a/CHANGELOG.md b/CHANGELOG.md index 75db313..24c903f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. This projec ## 1.6.0 (14. February 2024) + [#19](https://github.com/luyadev/yii-helpers/pull/19) Fixed issue with ordinal numbers. -+ []() Added `ImportHelper::csvFromResource()` method to import CSV from a resource object like `fopen()`. ++ [#21](https://github.com/luyadev/yii-helpers/pull/21) Added `ImportHelper::csvFromResource()` method to import CSV from a resource object like `fopen()`. ## 1.5.0 (26. October 2023) diff --git a/src/helpers/ImportHelper.php b/src/helpers/ImportHelper.php index a262731..4c0d4ea 100644 --- a/src/helpers/ImportHelper.php +++ b/src/helpers/ImportHelper.php @@ -12,6 +12,14 @@ */ class ImportHelper { + /** + * Import a CSV from a resource and return array. + * + * @param resource $resource + * @param array $options See {{luya\yii\helpers\ExportHelper::csv()}} for all options. + * @return array + * @since 1.6.0 + */ public static function csvFromResource($resource, array $options = []): array { if (!is_resource($resource)) {