PHPackages                             axis/axis-extends-behavior - 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. [Database &amp; ORM](/categories/database)
4. /
5. axis/axis-extends-behavior

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

axis/axis-extends-behavior
==========================

Propel 1.6 behavior that handles DB entity extension

169PHP

Since Jan 15Pushed 13y ago1 watchersCompare

[ Source](https://github.com/e1himself/axis-extends-behavior)[ Packagist](https://packagist.org/packages/axis/axis-extends-behavior)[ RSS](/packages/axis-axis-extends-behavior/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

AxisExtendsBehavior
===================

[](#axisextendsbehavior)

This behavior allows you to declare single table inheritance entities with extended data fields stored to another table.

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

[](#installation)

Use [Composer](http://getcomposer.org/). Just add this dependency to your `composer.json`:

```
  "require": {
    "axis/axis-extends-behavior": "dev-master"
  }
```

Add behavior to your propel.ini file:

```
...
propel.behavior.axis_extends.class = lib.vendor.axis.axis-extends-behavior.lib.AxisExtendsBehavior
...
```

Usage
-----

[](#usage)

### Declaration

[](#declaration)

Use behavior in your schema:

```
my_page:
  id: ~
  title: { type: varchar }
  body:  { type: varchar, size: 3000 }
  type:         { type: varchar }
  _inheritance:
    column:    type
    # Note: the classes map should be empty to allow extending this class from any plugins
    # without modification of main schema.yml file.
    # Of course, you can constrain inheritance classes defining key-classes map here if you want.
    classes:   {}

# note that extension table name (my_product_page_data) doesn't match
# .. generated additional class name (MyProductPage). This is important.
my_product_page_data:
  id: { primaryKey: true, type: integer, foreignTable: my_page, foreignReference: id, onDelete: cascade, required: true }
  product_id:  { type: integer, foreignTable: my_product, foreignReference: id, onDelete: restrict }
  _propel_behaviors:
    axis_extends: { class_name: MyProductPage, extends: my_page }
```

This schema will generate following classes:

```
// main entity AR class
class MyPage extends BaseMyPage { /* ... */ }

// extended entity AR class
class MyProductPage extends BaseMyProductPage { /* ... */ }
// extended entity base class extends main entity class
class BaseMyProductPage extends MyPage { /* ... */ }

// extended entity additional fields object stored to `my_product_page_data`
class MyProductPageData extends BaseMyProductPageData { /* ... */ }
```

### Usage

[](#usage-1)

```
$myPage = new MyPage();
$myPage->setTitle('Regular page');
$myPage->setBody('Hello world!');
$myPage->save(); // stores 1 row to 'my_page' table

$productPage = new MyProductPage();
$productPage->setTitle('Product page'); // sets 'my_page.title' field
$productPage->setBody('It\'s a product page! Hooray!'); // sets 'my_page.body' field
// seamless extended fields access
$productPage->setProductId($product->getId()); // sets 'my_product_page_data.product_id' field
$productPage->save(); // stores 1 row to 'my_page' table and 1 row to 'my_product_page_data' table
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d24c797f078b59b84f555eb4ac8b468424e3b29740180a4abb5ca5bc51e27f5?d=identicon)[7heaven](/maintainers/7heaven)

---

Top Contributors

[![e1himself](https://avatars.githubusercontent.com/u/370680?v=4)](https://github.com/e1himself "e1himself (17 commits)")

### Embed Badge

![Health badge](/badges/axis-axis-extends-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/axis-axis-extends-behavior/health.svg)](https://phpackages.com/packages/axis-axis-extends-behavior)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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