mtas-tv-backend/config/autoload/doctrine.global.php
2018-04-17 17:21:44 +02:00

77 lines
3.8 KiB
PHP

<?php
return [
'dependencies' => [
'aliases' => [
Doctrine\ORM\EntityManager::class => 'doctrine.entity_manager.orm_default',
],
'factories' => [
'doctrine.entity_manager.orm_default' => ContainerInteropDoctrine\EntityManagerFactory::class,
],
],
'doctrine' => [
'driver' => [
'orm_default' => [
'class' => Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain::class,
'drivers' => [
'App\Entity' => 'app_entity',
],
],
'app_entity' => [
'class' => Doctrine\ORM\Mapping\Driver\AnnotationDriver::class,
'cache' => 'array',
'paths' => __DIR__ . '/../../src/App/Entity',
],
],
'configuration' => [
'orm_default' => [
// 'datetime_functions' => [
// 'date' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'time' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'timestamp' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'convert_tz' => Oro\ORM\Query\AST\Functions\DateTime\ConvertTz::class,
// ],
'numeric_functions' => [
// 'timestampdiff' => Oro\ORM\Query\AST\Functions\Numeric\TimestampDiff::class,
// 'dayofyear' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'dayofmonth' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'dayofweek' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'week' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'day' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'hour' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'minute' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'month' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'quarter' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'second' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'year' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'sign' => Oro\ORM\Query\AST\Functions\Numeric\Sign::class,
// 'pow' => Oro\ORM\Query\AST\Functions\Numeric\Pow::class,
],
// 'string_functions' => [
// 'md5' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
// 'group_concat' => Oro\ORM\Query\AST\Functions\String\GroupConcat::class,
// 'cast' => Oro\ORM\Query\AST\Functions\Cast::class,
// 'concat_ws' => Oro\ORM\Query\AST\Functions\String\ConcatWs::class
// ]
// 'filters' => [
// 'soft-deleteable' => Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter::class,
// ],
],
],
'event_manager' => [
'orm_default' => [
'subscribers' => [
Gedmo\Timestampable\TimestampableListener::class,
// 'Gedmo\Tree\TreeListener',
// 'Gedmo\SoftDeleteable\SoftDeleteableListener',
// 'Gedmo\Translatable\TranslatableListener',
// 'Gedmo\Blameable\BlameableListener',
// 'Gedmo\Loggable\LoggableListener',
Gedmo\Sortable\SortableListener::class,
// 'Gedmo\Sluggable\SluggableListener',
],
],
],
],
];