Download the PHP package tatter/exports without Composer
On this page you can find all versions of the php package tatter/exports. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tatter/exports
More information about tatter/exports
Files in tatter/exports
Package exports
Short Description Modular file exports, for CodeIgniter 4
License MIT
Homepage https://github.com/tattersoftware/codeigniter4-exports
Informations about the package exports
Tatter\Exports
Modular file exports, for CodeIgniter 4
Quick Start
- Install with Composer:
> composer require tatter/exports
- Load a handler:
$handler = new \Tatter\Exports\Exports\DownloadHandler($myFile);
- Run the export:
return $handler->process();
Description
Exports defines small classes that can be used to direct files to various destinations.
Each class is a handler discoverable by Tatter\Handlers
with a distinct set of attributes
and its own doProcess()
method to do the actual export. Think of an export as something
you might see on a "share menu" from a mobile device: supported destinations for a file type.
Installation
Install easily via Composer to take advantage of CodeIgniter 4's autoloading capabilities and always be up-to-date:
Or, install manually by downloading the source files and adding the directory to app/Config/Autoload.php.
Usage
You may load Export handlers directly, or use the ExportersFactory
to locate them based
on their attributes:
Every handler supports basic setters to provide your file and optional overrides for file metadata:
To execute the export, call its process()
method, which will return a ResponseInterface
: