PHPackages                             christopher-paul-shaw/datastore - 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. christopher-paul-shaw/datastore

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

christopher-paul-shaw/datastore
===============================

Interacting with File Based Data

1.1.0(7y ago)215[1 issues](https://github.com/christopher-paul-shaw/DataStore/issues)PHPPHP ^7.1CI failing

Since Jul 1Pushed 6y agoCompare

[ Source](https://github.com/christopher-paul-shaw/DataStore)[ Packagist](https://packagist.org/packages/christopher-paul-shaw/datastore)[ RSS](/packages/christopher-paul-shaw-datastore/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Summary
=======

[](#summary)

This is a class which uses the directory and file structure of a filesystem to store and manipulate information. It does so using unique indentifiers for folder names and .dat files to hold the content of fields.

Why would you use DataStore
===========================

[](#why-would-you-use-datastore)

DataStore in its current version works only with the filesystem, which although not scalable for larger datasets, can be of use for simpler systems.

- Low overhead compared to a database
- Capable of Creating, Reading, Updating, Deleting and Searching through data
- Can be easily extended to add additional functionality
- Simple to Backup and Restore Data

Some Example Uses
-----------------

[](#some-example-uses)

- User Login System
- Blog / Guesbook
- System Logging

History Timeline for DataStore
==============================

[](#history-timeline-for-datastore)

DataStore is the evolution of a class called Entity from () Entity was a raw class to standardise how the WebPi software would interact with data stored within the filesystem

- Started Life as Entity.php in WebPi ()
- Became a general way for WebPi to access data and becoming basis for an authentication class.
- Was moved to its own repository with unit tests to be shared between progects
- Renamed to DataStore and Added to packagest for composer install

Usage
=====

[](#usage)

Creating
--------

[](#creating)

```
$payload = [
       'id_entity' => 'testId',
       'test' => 'case'
];

$dataStore = new DataStore('exampleID');
$dataStore>create($payload);

```

Read
----

[](#read)

```
$dataStore = new DataStore('exampleID');
$dataStore>getValue('fieldname');

```

Updating
--------

[](#updating)

```
$dataStore = new DataStore('exampleID');
$dataStore>getValue('field', 'value');

```

Deleting
--------

[](#deleting)

```
$dataStore = new DataStore('exampleID');
$dataStore>delete();

```

Searching
---------

[](#searching)

```
$filters = [
    ['field','=','value'],
    ['field','>','value']
];

$search = new DataStore();
$results = $search->search();

```

How to Install
==============

[](#how-to-install)

1. Composer
-----------

[](#1-composer)

The preferred method is using composer () and can be insalled using the following command

```
composer require christopher-paul-shaw/datastore

```

2. Cloning
----------

[](#2-cloning)

You can also clone the repository from github

```
git clone git@github.com:christopher-paul-shaw/DataStore.git

```

Running Tests
=============

[](#running-tests)

```
vendor/bin/phpunit test

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~157 days

Total

3

Last Release

2558d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8bafba22afd8eaab18fa018a05f6d8082881138b6fd434615047ca07b1620a79?d=identicon)[chris-shaw](/maintainers/chris-shaw)

---

Top Contributors

[![christopher-paul-shaw](https://avatars.githubusercontent.com/u/12035126?v=4)](https://github.com/christopher-paul-shaw "christopher-paul-shaw (25 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/christopher-paul-shaw-datastore/health.svg)

```
[![Health](https://phpackages.com/badges/christopher-paul-shaw-datastore/health.svg)](https://phpackages.com/packages/christopher-paul-shaw-datastore)
```

###  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.8M125](/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.7M62](/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)
