|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +use Cycle\ORM\SchemaInterface; |
| 6 | + |
| 7 | +/** @see \Spiral\Cycle\Config\CycleConfig */ |
| 8 | +return [ |
| 9 | + 'schema' => [ |
| 10 | + /** |
| 11 | + * true (Default) - Schema will be stored in a cache after compilation. |
| 12 | + * It won't be changed after entity modification. Use `php app.php cycle` to update schema. |
| 13 | + * |
| 14 | + * false - Schema won't be stored in a cache after compilation. |
| 15 | + * It will be automatically changed after entity modification. (Development mode) |
| 16 | + */ |
| 17 | + 'cache' => true, |
| 18 | + |
| 19 | + /** |
| 20 | + * The CycleORM provides the ability to manage default settings for |
| 21 | + * every schema with not defined segments |
| 22 | + */ |
| 23 | + 'defaults' => [ |
| 24 | + SchemaInterface::MAPPER => \Cycle\ORM\Mapper\Mapper::class, |
| 25 | + SchemaInterface::REPOSITORY => \Cycle\ORM\Select\Repository::class, |
| 26 | + SchemaInterface::SCOPE => null, |
| 27 | + SchemaInterface::TYPECAST_HANDLER => [ |
| 28 | + \Cycle\ORM\Parser\Typecast::class |
| 29 | + ], |
| 30 | + ], |
| 31 | + |
| 32 | + 'collections' => [ |
| 33 | + 'default' => 'array', |
| 34 | + 'factories' => [ |
| 35 | + 'array' => new \Cycle\ORM\Collection\ArrayCollectionFactory(), |
| 36 | + // 'doctrine' => new \Cycle\ORM\Collection\DoctrineCollectionFactory(), |
| 37 | + // 'illuminate' => new \Cycle\ORM\Collection\IlluminateCollectionFactory(), |
| 38 | + ], |
| 39 | + ], |
| 40 | + |
| 41 | + /** |
| 42 | + * Schema generators (Optional) |
| 43 | + * null (default) - Will be used schema generators defined in bootloaders |
| 44 | + */ |
| 45 | + 'generators' => null, |
| 46 | + ], |
| 47 | + |
| 48 | + /** |
| 49 | + * Prepare all internal ORM services (mappers, repositories, typecasters...) |
| 50 | + */ |
| 51 | + 'warmup' => \env('RR_MODE') !== null, |
| 52 | +]; |
0 commit comments