Provides a collection of attributes that add behaviors to Cycle ORM entities

1.3.0 2024-02-08 19:35 UTC

This package is auto-updated.

Last update: 2024-05-08 20:08:28 UTC


Latest Stable Version Build Status Scrutinizer Code Quality Codecov 68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646973636f72642d636861742d6d6167656e74612e737667

The package provides a collection of attributes that add behaviors to Cycle ORM entities. It also provides a convenient API to create custom behavior attributes.


The package is available via composer and can be installed using the following command:

composer require cycle/entity-behavior


After installation the package you need to create Cycle\ORM\ORM object with passing \Cycle\ORM\Entity\Behavior\EventDrivenCommandGenerator generator object as third (commandGenerator) argument.


use Cycle\ORM\ORM;
use Cycle\ORM\Entity\Behavior\EventDrivenCommandGenerator;

// Application container (PSR-11 compatible).
$container = new Container();
$commandGenerator = new EventDrivenCommandGenerator($schema, $container);

$orm = new ORM(
  factory: $factory, 
  schema: $schema, 
  commandGenerator: $commandGenerator

That's it. Now you can use all benefits of this package.

Available behaviors


The MIT License (MIT). Please see LICENSE for more information. Maintained by Spiral Scout.