PHPackages                             back-2-95/fields - 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. [API Development](/categories/api)
4. /
5. back-2-95/fields

AbandonedArchivedLibrary[API Development](/categories/api)

back-2-95/fields
================

CRUD Fields API for PHP7

v0.2(10y ago)035PHPPHP ^7.0

Since Mar 28Pushed 10y agoCompare

[ Source](https://github.com/back-2-95/fields)[ Packagist](https://packagist.org/packages/back-2-95/fields)[ Docs](https://github.com/back-2-95/php-crud-fields)[ RSS](/packages/back-2-95-fields/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

back-2-95/fields
================

[](#back-2-95fields)

Generic Field API for PHP7. This library handles only the metadata about entities and fields related to them.

[![Travis CI](https://camo.githubusercontent.com/0d883475256ac5ad7861576497858d5349744f0a005067296596686353a6702a/68747470733a2f2f7472617669732d63692e6f72672f6261636b2d322d39352f6669656c64732e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/0d883475256ac5ad7861576497858d5349744f0a005067296596686353a6702a/68747470733a2f2f7472617669732d63692e6f72672f6261636b2d322d39352f6669656c64732e7376673f6272616e63683d6d6173746572)[![PHP version](https://camo.githubusercontent.com/08b4c15d752ca2c287ee7c6487908f56eabdb425040824b3c6c099002d646151/68747470733a2f2f62616467652e667572792e696f2f70682f6261636b2d322d39352532466669656c64732e737667)](https://badge.fury.io/ph/back-2-95%2Ffields)

[![Graph](https://camo.githubusercontent.com/55316957c66b6ad53e6b57852187cc3617c1460cfa529ba84bcd372954887d48/68747470733a2f2f7777772e676c696666792e636f6d2f676f2f7075626c6973682f696d6167652f31303131313337332f4d2e706e67)](https://camo.githubusercontent.com/55316957c66b6ad53e6b57852187cc3617c1460cfa529ba84bcd372954887d48/68747470733a2f2f7777772e676c696666792e636f6d2f676f2f7075626c6973682f696d6167652f31303131313337332f4d2e706e67)

TODO
----

[](#todo)

I'll keep this todo list on top until the library is usable.

- Validate and force field data structure. Now they are just arrays of anything. (IN PROGRESS)
- In that structure, try to separate general, form and display related data.
- Implementation example (own repo) e.g. application which uses fields api, mongodb storage and zf2 classes

API
---

[](#api)

Create API and set storage:

```
$api = new \BackTo95\Fields\Api();
$storage = new \BackTo95\Fields\Storage\FileStorage('data/entities');
$api->setStorage($storage);
```

Create EntityConfiguration with fields:

```
$track_configuration = new \BackTo95\Fields\Entity\EntityConfiguration([
    'name' => 'track',
    'description' => 'Track represents musical track made with tracker software',
    'fields' => [
        'title' => [...],
        'description' => [...],
    ],
]);
```

Store the created EntityConfiguration:

```
$api->storeEntityConfiguration($track_configuration);
```

Get stored EntityConfiguration by name:

```
$api->getEntityConfiguration('track');
```

EntityConfiguration data
------------------------

[](#entityconfiguration-data)

Example entity: track (as in music)

```
[
    'name' => 'track',
    'description' => 'Track represents musical track made with tracker software',
    'fields' => [
        'artist' => [
            'name' => 'artist',
            'form' => [
                'widget' => 'text',
                'filters' => ['trim'],
            ],
            'required' => 1,
        ],
        'title' => [
            'name' => 'title',
            'form' => [
                'widget' => 'text',
            ],
            'required' => 1,
        ],
        'description' => [
            'name' => 'description',
            'form' => [
                'widget' => 'editor',
            ],
        ],
        'cover' => [
            'name' => 'cover',
            'form' => [
                'widget' => 'image',
            ],
        ],
        'genre' => [
            'name' => 'genre',
            'form' => [
                'widget' => 'tags',
                'validators' => [
                    'min' => 1
                ],
            ],
            'multivalue' => 1,
            'required' => 1,
        ],
    ]
],
```

Notes: widget name can be anything, the implementing library will decide what the widgets are finally. E.g. widget "editor" can be CKeditor, TinyMCE or something else.

Output
------

[](#output)

This library should just return entities and their field configurations which can be then used by some other component to store, render, validate etc.

Rendering
---------

[](#rendering)

Rendering is not responsibility of this class.

UI for creating configurations
------------------------------

[](#ui-for-creating-configurations)

UI is not part of this library. It should be another library which requires and uses this library.

Storage
-------

[](#storage)

Storing this configuration is not part of this library e.g.

This library provides interface for Storage adapters and file based solution as an example.

By default this adapter uses path `data/entities` for storing configurations.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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 ~0 days

Total

2

Last Release

3746d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4cd9c5f6ffd2d6019f8375ce471fd34395c78885b9b9cf22e9a97be47c875138?d=identicon)[back-2-95](/maintainers/back-2-95)

---

Top Contributors

[![back-2-95](https://avatars.githubusercontent.com/u/1140272?v=4)](https://github.com/back-2-95 "back-2-95 (19 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/back-2-95-fields/health.svg)

```
[![Health](https://phpackages.com/badges/back-2-95-fields/health.svg)](https://phpackages.com/packages/back-2-95-fields)
```

###  Alternatives

[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)[cdiscount/sdkphpapi

PHP SDK for the Cdiscount Marketplace API

163.3k](/packages/cdiscount-sdkphpapi)

PHPackages © 2026

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