PHP code example of cycle / entity-behavior
1. Go to this page and download the library: Download cycle/entity-behavior library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cycle / entity-behavior example snippets
use Cycle\ORM\ORM;
use Cycle\ORM\Entity\Behavior\EventDrivenCommandGenerator;
// Application container (PSR-11 compatible).
// https://www.php-fig.org/psr/psr-11/
$container = new Container();
$commandGenerator = new EventDrivenCommandGenerator($schema, $container);
$orm = new ORM(
factory: $factory,
schema: $schema,
commandGenerator: $commandGenerator
);