PHP code example of webservco / file

1. Go to this page and download the library: Download webservco/file library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

webservco / file example snippets


public function createDownloadResponse(FileInterface $file): ResponseInterface 

public function createOutputResponse(FileInterface $file): ResponseInterface

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

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

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

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