PHPackages                             mateusfornari/hypersistence-alpha - 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. [Framework](/categories/framework)
4. /
5. mateusfornari/hypersistence-alpha

ActiveLibrary[Framework](/categories/framework)

mateusfornari/hypersistence-alpha
=================================

PHP Object Oriented persistence framework.

v1.1(8y ago)3243MITPHPPHP &gt;=5.3.0

Since Sep 8Pushed 8y ago3 watchersCompare

[ Source](https://github.com/mateusfornari/hypersistence-alpha)[ Packagist](https://packagist.org/packages/mateusfornari/hypersistence-alpha)[ Docs](http://github.com/mateusfornari/hypersistence-alpha)[ RSS](/packages/mateusfornari-hypersistence-alpha/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Hypersistence2.0
================

[](#hypersistence20)

PHP Object Orented persistence framework.

---

Use doc comment tags for mapping classes with database.

### Example:

[](#example)

```
/**
 * @table(person)
 */
class Person extends Hypersistence{

    /**
     * @primaryKey
     * @column(person_id)
     */
    private $id;

    /**
     * Use empty column when the column has the same name that var.
     * @column()
     */
    private $name;

    /**
     * When you have a Many to One relationship use tags as below.
     * You can use 'lazy' or 'eager'.
     * @manyToOne(lazy)
     * @column(city_id)
     * @itemClass(City)
     */
    private $city;

    /**
     * When you have a One to Many relationship use tags as below.
     * You can use 'lazy' or 'eager'.
     * @oneToMany(lazy)
     * @joinColumn(person_id)
     * @itemClass(Book)
     */
    private $books;

    /**
     * When you have a Many to Many relationship use tags as below.
     * You can use 'lazy' or 'eager'.
     * @manyToMany(lazy)
     * @joinColumn(person_id)
     * @inverseJoinColumn(course_id)
     * @itemClass(Course)
     * @joinTable(person_has_course)
     */
    private $courses;

    public function getId(){
        return $this->id;
    }

    public function setId($id){
        $this->id = $id;
    }

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

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

    public function getCity(){
        return $this->city;
    }

    public function setCity($city){
        $this->city = $city;
    }

    public function getBooks(){
        return $this->books;
    }

    public function getCourses(){
        return $this->courses;
    }
}
```

### Load Example:

[](#load-example)

```
$p = new Person();
$p->setId(1);
$p->load();

echo $p->getName();
```

### Save Example:

[](#save-example)

```
$p = new Person();
$p->setName('Mateus Fornari');
$city = new City(1);
$city->load();
$p->setCity($city);
$p->save();
```

### Search Example:

[](#search-example)

```
$p = new Person();
$p->setName('Mateus');

$search = $p->search();
$search->orderBy('name', 'asc');
$search->orderBy('city.name', 'desc');

$list = $search->execute();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

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

Total

2

Last Release

3162d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6644ee1218b326878d87c6fe2903de95e638d027f47fa7e627f0a56b61960670?d=identicon)[mateusfornari](/maintainers/mateusfornari)

---

Top Contributors

[![mateusfornari](https://avatars.githubusercontent.com/u/5758826?v=4)](https://github.com/mateusfornari "mateusfornari (42 commits)")

---

Tags

frameworkpersistencemicroframework

### Embed Badge

![Health badge](/badges/mateusfornari-hypersistence-alpha/health.svg)

```
[![Health](https://phpackages.com/badges/mateusfornari-hypersistence-alpha/health.svg)](https://phpackages.com/packages/mateusfornari-hypersistence-alpha)
```

PHPackages © 2026

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