Skip to content

Repository files navigation

Cycle ORM Entity Behavior

Latest Stable VersionBuild StatusScrutinizer Code QualityCodecov

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.

Installation

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

composer require cycle/entity-behavior

Configuration

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.

Example

useCycle\ORM\ORM;
useCycle\ORM\Entity\Behavior\EventDrivenCommandGenerator;
// Application container (PSR-11 compatible).// https://www.php-fig.org/psr/psr-11/$container = newContainer();
$commandGenerator = newEventDrivenCommandGenerator($schema, $container);
$orm = newORM(
factory: $factory,
schema: $schema,
commandGenerator: $commandGenerator,
);

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

Available behaviors

License:

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

About

No description or website provided.

Topics

Resources

Code of conduct

Contributing

Stars

8 stars

Watchers

4 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages