PHPackages                             minond/model - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. minond/model

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

minond/model
============

Object models

v1.2.0(12y ago)1570GPL-2.0+PHPPHP &gt;=5.4.0

Since Jan 31Pushed 12y ago1 watchersCompare

[ Source](https://github.com/minond/Model)[ Packagist](https://packagist.org/packages/minond/model)[ RSS](/packages/minond-model/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

Model
=====

[](#model)

[![Build Status](https://camo.githubusercontent.com/b7bd72225362957a52fc006f7a4d19c49af42d4d5f9d40abcb22490dd28fb8c6/68747470733a2f2f7472617669732d63692e6f72672f6d696e6f6e642f4d6f64656c2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/minond/Model)[![Coverage Status](https://camo.githubusercontent.com/cf1c922565693dbc85b2a3ee236baad54658dc7ade9466776817b1fc49d658cd/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6d696e6f6e642f4d6f64656c2f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/minond/Model?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/d43a76362341e3acbc83ae89fa46d7f92f95f1d96e719e97ce396decb61f848c/68747470733a2f2f706f7365722e707567782e6f72672f6d696e6f6e642f6d6f64656c2f762f737461626c652e706e67)](https://packagist.org/packages/minond/model)[![Dependencies Status](https://camo.githubusercontent.com/b26da4fe9fba1b64a3c9bb2affa1bc8be50de3e556b045329ad729f0b8369e4f/68747470733a2f2f646570656e64696e672e696e2f6d696e6f6e642f4d6f64656c2e706e67)](http://depending.in/minond/Model)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/1ad5a04872a42c89119ec79e76b8787a0e997c2aa650d7d12726ae5c84d4c65c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d696e6f6e642f4d6f64656c2f6261646765732f7175616c6974792d73636f72652e706e673f733d62366331646434326364363461643332663966313137623463306238666130633561343264383030)](https://scrutinizer-ci.com/g/minond/Model/)[![SensioLabsInsight](https://camo.githubusercontent.com/a35dd48048bc6a74ad2dba08f765dfa9c49b00d900222024702871c4c559c4f5/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f38623866653362392d393365382d346238362d396136332d3338633435356264643632342f6d696e692e706e67)](https://insight.sensiolabs.com/projects/8b8fe3b9-93e8-4b86-9a63-38c455bdd624)

Models that are simple to create and use. Light weight but easily extensible.

#### Getters and setters will be simulated using the magic call method:

[](#getters-and-setters-will-be-simulated-using-the-magic-call-method)

```
use Efficio\Dataset\Model;

class User extends Model
{
    protected $first_name;
    protected $last_name;
    protected $full_name;
}
```

```
$me = new User;

// methods
$me->setFirstName('Marcos');
$me->setLastName('Minond');

// or properties
$me->first_name = 'Marcos';
$me->last_name = 'Marcos';
```

Both getter and setter methods may be overwritten:

```
use Efficio\Dataset\Model;

class User extends Model
{
    protected $first_name;
    protected $last_name;
    protected $full_name;

    public function getFullName()
    {
        return implode(' ', [ $this->first_name, $this->last_name ]);
    }
}
```

```
$me = new User;
$me->first_name = 'Marcos';
$me->last_name = 'Marcos';

echo $me->full_name; // outputs 'Marcos Minond'
```

#### Traits are used to specify how models are stored:

[](#traits-are-used-to-specify-how-models-are-stored)

```
use Efficio\Dataset\Model;
use Efficio\Dataset\Storage\Model\DatabaseStorage;

class User extends Model
{
    use DatabaseStorage;

    protected $first_name;
    // ...
}
```

Current storage traits are:

- `Efficio\Dataset\Storage\Model\DatabaseStorage` - store in a database using PDO.
- `Efficio\Dataset\Storage\Model\FileStorage` - store in flat files.
- `Efficio\Dataset\Storage\Model\NullStorage` - no storage.
- `Efficio\Dataset\Storage\Model\SessionStorage` - stored in the `$_SESSION` array

Since storage information is defined in the model level any sort of custom storage may be used.

#### Configuring storage methods

[](#configuring-storage-methods)

##### DatabaseStorage

[](#databasestorage)

```
// User uses DatabaseStorage trait
User::setConnection(new PDO('sqlite::memory:'));
```

##### FileStorage

[](#filestorage)

```
// User uses FileStorage trait
User::setDirectory('./cache/models/');
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

4

Last Release

4479d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3edcb2fa5ed594ffb1c9d8d8c36c06540b74755f4cdef4d4e69d71c3c7c7495e?d=identicon)[minond](/maintainers/minond)

---

Top Contributors

[![minond](https://avatars.githubusercontent.com/u/601509?v=4)](https://github.com/minond "minond (77 commits)")

### Embed Badge

![Health badge](/badges/minond-model/health.svg)

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

PHPackages © 2026

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