Setup feeds, request, and filter them
This commit is contained in:
1 parent
657975324a
commit
70e78bcf42
10 files changed
+330
-4
No files matched your search
@@ -6,6 +6,7 @@ use Doctrine\DBAL\Types\Type;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\ORMSetup;
|
||||
use Lewisdale\App\Logging\FileLogger;
|
||||
use Lewisdale\App\Models\Types\XMLElement;
|
||||
use Lewisdale\App\TwigExtensions\CsrfExtension;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Ramsey\Uuid\Doctrine\UuidType;
|
||||
@@ -40,6 +41,7 @@ $container->set(LoggerInterface::class, $container->get(FileLogger::class));
|
||||
|
||||
$container->set(EntityManager::class, static function() {
|
||||
Type::addType('uuid', UuidType::class);
|
||||
Type::addType(XMLElement::NAME, XMLElement::class);
|
||||
|
||||
$config = ORMSetup::createAttributeMetadataConfiguration(
|
||||
paths: array(__DIR__."/Models/Data"),
|
||||
@@ -51,6 +53,8 @@ $container->set(EntityManager::class, static function() {
|
||||
'path' => __DIR__ . '/../' . getenv("SQLITE_DB_NAME"),
|
||||
], $config);
|
||||
|
||||
$connection->executeQuery("PRAGMA foreign_keys = ON");
|
||||
|
||||
return new EntityManager($connection, $config);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user