A PHP component/library.

v0.8.0 2024-06-22 15:13 UTC

This package is auto-updated.

Last update: 2024-12-15 10:31:34 UTC


README

A PHP component/library for working with files.

Factory

Response\DownloadResponseFactory

public function createDownloadResponse(FileInterface $file): ResponseInterface 

FileFactory

public function createFromPath(string $contentType, string $filePath, string $name): FileInterface 
public function createFromString(string $contentType, string $fileData, string $name): FileInterface 

Service

  • use case: database result to CSV.
  • to use with a static array: $iterator = new ArrayIterator($array);

CSV\DataCreatorService

public function createCsvDataFromIterator(Iterator $iterator, bool $useHeaderLine): string;

CSV\FileCreatorService

public function createCsvFileFromIterator(string $fileName, Iterator $iterator, bool $useHeaderLine): CSVFile 

Value object

Implement FileInterface.

File

CSVFile