PHPackages                             eden/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. eden/model

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

eden/model
==========

Eden generic model component

4.0.1(10y ago)015.1k16MITPHPPHP &gt;=5.4.1

Since Sep 24Pushed 10y ago12 watchersCompare

[ Source](https://github.com/Eden-PHP/Model)[ Packagist](https://packagist.org/packages/eden/model)[ Docs](http://eden-php.com)[ RSS](/packages/eden-model/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (5)Dependencies (3)Versions (7)Used By (6)

[![logo](https://camo.githubusercontent.com/683ba05b2b51f50045c674b19a4f0ceb30702a8ab495623be7c02e07ab226f08/687474703a2f2f6564656e2e6f70656e6f766174652e636f6d2f6173736574732f696d616765732f636c6f75642d736f6369616c2e706e67)](https://camo.githubusercontent.com/683ba05b2b51f50045c674b19a4f0ceb30702a8ab495623be7c02e07ab226f08/687474703a2f2f6564656e2e6f70656e6f766174652e636f6d2f6173736574732f696d616765732f636c6f75642d736f6369616c2e706e67) Eden Model
================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#-eden-model)

[![Build Status](https://camo.githubusercontent.com/943c4e80a4639ec4d9d40e20cc83057c8b5924802f3daed318a5d22193260f6a/68747470733a2f2f6170692e7472617669732d63692e6f72672f4564656e2d5048502f4d6f64656c2e706e67)](https://travis-ci.org/Eden-PHP/Model)
=====================================================================================================================================================================================================================================================

[](#)

- [Install](#install)
- [Introduction](#intro)
- [Contributing](#contributing)

====

Install
-------

[](#install)

`composer install eden/model`

====

Introduction
------------

[](#introduction)

Manipulating array data in most cases can be expressed as a model. Models in *Eden* is defined loosely and as a utility class to help managing data in a controlled and chainable format. The basic setup of a model is described in `Figure 1`.

**Figure 1. Setup**

```
$user = array(
	'user_name' => 'Chris',
	'user_email' => 'cblanquera@openovate.com',
	'user_location' => 'Manila, Philippines');

eden('model', $user);

```

From here we can access properties in our model as a method, property or back as an array. `Figure 2` shows the ways to access data in action.

**Figure 2. Accessing Model Properties**

```
//set user name
$model->setUserName('Chris');

// returns user email
$model->getUserEmail();

// set any abstract key
$model->setAnyThing('somthing');

// get any abstract key
$model->getAnyThing();

//access as array
echo $model['user_name'];

//set as array
$model['user_email'] = 'my@email.com';

//access as object
echo $model->user_name;

//set as object
$model->user_name = 'my@email.com';

```

We added several common methods to futher manipulate model data.

**Figure 3. Utility Methods**

```
//for each row, copy the value of post_user to the user_id column
$model->copy('post_user', 'user_id');

//returns a raw array (no object)
$model->get();

```

====

\#Contributing to Eden

Contributions to *Eden* are following the Github work flow. Please read up before contributing.

\##Setting up your machine with the Eden repository and your fork

1. Fork the repository
2. Fire up your local terminal create a new branch from the `v4` branch of your fork with a branch name describing what your changes are. Possible branch name types:
    - bugfix
    - feature
    - improvement
3. Make your changes. Always make sure to sign-off (-s) on all commits made (git commit -s -m "Commit message")

\##Making pull requests

1. Please ensure to run `phpunit` before making a pull request.
2. Push your code to your remote forked version.
3. Go back to your forked version on GitHub and submit a pull request.
4. An Eden developer will review your code and merge it in when it has been classified as suitable.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~149 days

Recently: every ~187 days

Total

6

Last Release

3914d ago

Major Versions

1.0.4 → 4.x-dev2015-10-13

PHP version history (2 changes)1.0.2PHP &gt;=5.3.1

4.x-devPHP &gt;=5.4.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/120378?v=4)[Christian Blanquera](/maintainers/cblanquera)[@cblanquera](https://github.com/cblanquera)

---

Top Contributors

[![clark21](https://avatars.githubusercontent.com/u/5639521?v=4)](https://github.com/clark21 "clark21 (3 commits)")[![Sherlonv](https://avatars.githubusercontent.com/u/5492326?v=4)](https://github.com/Sherlonv "Sherlonv (1 commits)")

---

Tags

libraryeden

### Embed Badge

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

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

###  Alternatives

[league/iso3166

ISO 3166-1 PHP Library

69937.6M136](/packages/league-iso3166)[eden/mail

Eden POP3, IMAP and SMTP component

179275.6k1](/packages/eden-mail)[eden/core

Eden Core component full of secret sauce

14418.8k34](/packages/eden-core)[eden/sqlite

Eden SQLite Search, Collection, Model ORM componen

199.2k2](/packages/eden-sqlite)

PHPackages © 2026

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