PHPackages                             tatter/exports - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. tatter/exports

ActiveLibrary[File &amp; Storage](/categories/file-storage)

tatter/exports
==============

Modular file exports, for CodeIgniter 4

v2.1.0(5y ago)14.0k↓33.3%1[1 PRs](https://github.com/tattersoftware/codeigniter4-exports/pulls)1MITPHPPHP &gt;=7.2

Since Aug 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/tattersoftware/codeigniter4-exports)[ Packagist](https://packagist.org/packages/tatter/exports)[ Docs](https://github.com/tattersoftware/codeigniter4-exports)[ RSS](/packages/tatter-exports/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (9)Dependencies (7)Versions (12)Used By (1)

Tatter\\Exports
===============

[](#tatterexports)

Modular file exports, for CodeIgniter 4

[![](https://github.com/tattersoftware/codeigniter4-exports/workflows/PHPUnit/badge.svg)](https://github.com/tattersoftware/codeigniter4-exports/actions/workflows/test.yml)[![](https://github.com/tattersoftware/codeigniter4-exports/workflows/PHPStan/badge.svg)](https://github.com/tattersoftware/codeigniter4-exports/actions/workflows/analyze.yml)[![](https://github.com/tattersoftware/codeigniter4-exports/workflows/Deptrac/badge.svg)](https://github.com/tattersoftware/codeigniter4-exports/actions/workflows/inspect.yml)[![Coverage Status](https://camo.githubusercontent.com/6a4501b723a3ebd85573ec873bd5c4455ab5e7b8c5de2b7d68fbaa536873a63c/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f746174746572736f6674776172652f636f646569676e69746572342d6578706f7274732f62616467652e7376673f6272616e63683d646576656c6f70)](https://coveralls.io/github/tattersoftware/codeigniter4-exports?branch=develop)

Quick Start
-----------

[](#quick-start)

1. Install with Composer: `> composer require tatter/exports`
2. Load a handler: `$handler = new \Tatter\Exports\Exports\DownloadHandler($myFile);`
3. Run the export: `return $handler->process();`

Description
-----------

[](#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
------------

[](#installation)

Install easily via Composer to take advantage of CodeIgniter 4's autoloading capabilities and always be up-to-date:

```
composer require tatter/exports
```

Or, install manually by downloading the source files and adding the directory to **app/Config/Autoload.php**.

Usage
-----

[](#usage)

You may load Export handlers directly, or use the `ExportersFactory` to locate them based on their attributes:

```
// Loaded directly
$handler = new \Tatter\Exports\Exporters\DownloadExporter($myFile);`

// Located by Handlers
$class    = ExporterFactory::find('download');
$exporter = new $class($myFile);
```

Every handler supports basic setters to provide your file and optional overrides for file metadata:

```
$exporter->setFile('/path/to/file');
// or...
$file = new \CodeIgniter\Files\File('/path/to/file');
$exporter->setFile($file);

$exporter->setFileName('RenameFileDuringExport.bam');
$exporter->setFileMime('overriding/mimetype');
```

To execute the export, call its `process()` method, which will return a `ResponseInterface`:

```
use Tatter\Exports\ExporterFactory;

class MyController
{
    public function previewFile($path)
    {
        $class    = ExporterFactory::find('preview');
        $exporter = new $class();

        return $exporter->setFile($path)->process();
    }
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 98.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~112 days

Total

9

Last Release

1572d ago

Major Versions

v1.0.1 → v2.0.02020-09-21

v2.1.0 → v3.0.0-beta.12022-01-20

PHP version history (3 changes)v1.0.0PHP ^7.0

v2.0.0PHP &gt;=7.2

v3.0.0-beta.1PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ebe908b4fe73807ecdd9f88733342199c9991b7de800329f5b2b787c8210d62?d=identicon)[MGatner](/maintainers/MGatner)

---

Top Contributors

[![MGatner](https://avatars.githubusercontent.com/u/17572847?v=4)](https://github.com/MGatner "MGatner (59 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

codeigniterfilessendsocialsharecodeigniter4exports

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tatter-exports/health.svg)

```
[![Health](https://phpackages.com/badges/tatter-exports/health.svg)](https://phpackages.com/packages/tatter-exports)
```

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k639.1M2.2k](/packages/league-flysystem)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[league/flysystem-local

Local filesystem adapter for Flysystem.

225231.8M39](/packages/league-flysystem-local)[mikehaertl/php-tmpfile

A convenience class for temporary files

9729.7M20](/packages/mikehaertl-php-tmpfile)[league/flysystem-memory

In-memory filesystem adapter for Flysystem.

8533.6M194](/packages/league-flysystem-memory)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
