PHPackages                             webd/noorm - 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. webd/noorm

ActiveLibrary

webd/noorm
==========

No ORM storage of PHP object

0.2(10y ago)1611PHP

Since Sep 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/tdebatty/php-noorm)[ Packagist](https://packagist.org/packages/webd/noorm)[ RSS](/packages/webd-noorm/feed)WikiDiscussions master Synced 1mo ago

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

PHP-Noorm
=========

[](#php-noorm)

[![Build Status](https://camo.githubusercontent.com/2aaf4f857287eaabd82686895fd4d5e6ba63d73ed6aebc079be0e6226c0c9041/68747470733a2f2f7472617669732d63692e6f72672f74646562617474792f7068702d6e6f6f726d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tdebatty/php-noorm) [![Latest Stable Version](https://camo.githubusercontent.com/538d7f28f13fb6e721fa1f052cc2ce7ad30762902b2f6abb36c055a25c289ce8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776562642f6e6f6f726d2e737667)](https://packagist.org/packages/webd/noorm)

No-ORM storage of PHP object.

PHP-Noorm makes it easy to persist your PHP object, without the overhead of Object-Relation Mapping (ORM).

Installation
------------

[](#installation)

Install the latest version using composer:

```
$ composer require webd/noorm
```

Quickstart
----------

[](#quickstart)

First, load composer, and define a directory where your objects can be saved (it has to be writable).

```
require_once __DIR__  . "/../vendor/autoload.php";
use noorm\Persistent;

// Indicate where to save data
Persistent::SetDirectory("/tmp/noorm-example");
```

Define the classes that you want to persist. They have to extend the class [**\\noorm\\Persitent**](./doc/persistent.md).

```
class Client extends Persistent {

  public $name = "";
  private $val;

  /**
   * Use annotations to indicate $items is a many-to-many relation to class Item
   * @target Item
   * @var \noorm\ManyToManyRelation
   */
  public $items;

  public function SetName($name) {
    $this->name = $name;
    return $this;
  }

  public function GetVal() {
    return $this->val;
  }

  public function SetVal($val) {
    $this->val = $val;
    return $this;
  }
}

class Item extends Persistent {

  public $name = "";

  /**
   * Use annotations to indicate $clients is a many-to-many relation to Client
   * @target Client
   * @var \noorm\ManyToManyRelation
   */
  public $clients;
}
```

You can now create objects and save them on disk.

```
// Create a new object and save it to disk
$client = new Client();
$client->name = "C1";
$client->Save();
```

The static method **All()** returns a [**\\noorm\\Dataset**](./doc/dataset.md) representing all the saved objects of this class. You can use this dataset to filter, sort or list your objects.

```
// Show all clients
/* @var $client Client */
foreach (Client::All()->Collect() as $client) {
  echo $client->name . " : ";
  echo $client->items->Get()->Count() . " items\n";
}
```

PHP-Noorm also manages [**many-to-many relations**](./doc/many-to-many.md) for you. These are described using annotations in your class definition.

```
// Create a new item
$item = new Item();
$item->name = "I";
$item->Save();

// Add this item to the first client
$client = Client::All()->First();
$client->items->Add($item);
```

Known bugs and limitations
--------------------------

[](#known-bugs-and-limitations)

These are planned improvements:

- There can be only one many-to-many relation between two classes;
- You cannot define a many-to-many relation between a class and itself;
- All() will eagerly load all objects, which is memory expensive.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

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

3894d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c315a5fa6bd564f98127e90046ff629dad5a22cd509cc53d07f5858c85b08fc?d=identicon)[tdebatty](/maintainers/tdebatty)

---

Top Contributors

[![tdebatty](https://avatars.githubusercontent.com/u/872972?v=4)](https://github.com/tdebatty "tdebatty (15 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/webd-noorm/health.svg)

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

###  Alternatives

[mlambley/swagception

Validate your API against Swagger 2.0 using Codeception

4629.4k1](/packages/mlambley-swagception)

PHPackages © 2026

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