PHPackages                             99designs/cabinet - 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. 99designs/cabinet

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

99designs/cabinet
=================

A filestore abstraction for PHP

1.0.0(12y ago)130.0k1MITPHPPHP &gt;=5.3

Since Aug 26Pushed 11y ago71 watchersCompare

[ Source](https://github.com/99designs/cabinet)[ Packagist](https://packagist.org/packages/99designs/cabinet)[ RSS](/packages/99designs-cabinet/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Cabinet is a filestore abstraction written in PHP. Filestores map string keys to files.

At the core of Cabinet is the `FileStore` interface, which defines most of the operations you'd find in a normal filesystem (read, write, delete, etc.). By programming to this interface, your application code remains unaware of the underlying filestore implementation.

Abstracting the filestore lets you swap one implementation for another without requiring changes to your application code. For example, you might use S3 in production, a local filesystem in dev, and an array-backed implementation in your unit tests.

Filestore implementations
-------------------------

[](#filestore-implementations)

Cabinet comes with a number of filestore implementations:

- `FilesystemFileStore` stores files in your local filesystem.
- `ArrayFileStore` stores files in a PHP array.
- `NullFileStore` is a black hole like `/dev/null`.

There are two additional wrapper implementations:

- `ReadOnlyFileStore` delegates read and write operations to two separate filestores.
- `MountPointFileStore` provides a way to compose multiple filestores into a virtual filesystem.

To provide a custom implementation, write a class that implements `Cabinet\FileStore`.

Example usage
-------------

[](#example-usage)

You'd typically defer construction of a filestore to a factory constructor:

```
class FileStoreFactory
{
    public static function create() {
        // This might return an implementation based on your app config
        return new \Cabinet\FilesystemFileStore('/tmp/myfiles');
    }
}

```

Then your application code uses the filestore like so:

```
$store = FileStoreFactory::create();
$file = $store->newFile('/foo/bar');
$store->setFileContents($file, 'some data');
$store->close($file);

```

This writes the given data to `/tmp/myfiles/foo/bar`.

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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

Unknown

Total

1

Last Release

4639d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61d94165c13417941a32d14d4468f27868c7643e96495090cfd33009055ea48c?d=identicon)[mtibben](/maintainers/mtibben)

![](https://www.gravatar.com/avatar/6d43d23630fc281c26ff5872d03d054e1508b5676eeefee1424464ab5c0f00e4?d=identicon)[arthens](/maintainers/arthens)

![](https://www.gravatar.com/avatar/077206ec25224ef22d3151c8d6803444c5a0dfb5c9977d8e28d1da3c51ae0534?d=identicon)[sinamt](/maintainers/sinamt)

---

Top Contributors

[![harto](https://avatars.githubusercontent.com/u/103448?v=4)](https://github.com/harto "harto (14 commits)")[![DanielHeath](https://avatars.githubusercontent.com/u/47430?v=4)](https://github.com/DanielHeath "DanielHeath (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/99designs-cabinet/health.svg)

```
[![Health](https://phpackages.com/badges/99designs-cabinet/health.svg)](https://phpackages.com/packages/99designs-cabinet)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M123](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M61](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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