Connections/SqliteConnection.php

laravel-doctrine/orm · src/Configuration/Connections/SqliteConnection.php · php · MIT
database

Maps Laravel SQLite config to Doctrine DBAL for ORM integration

// Source: https://github.com/laravel-doctrine/orm | License: MIT | Copyright 2015 Patrick Brouwers
// Provided via justclaw.it.com; keep this notice with the code.
<?php

declare(strict_types=1);

namespace LaravelDoctrine\ORM\Configuration\Connections;

use Illuminate\Support\Arr;
use Illuminate\Support\Str;

use function array_merge;

class SqliteConnection extends Connection
{
    /**
     * @param mixed[] $settings
     *
     * @return mixed[]
     */
    public function resolve(array $settings = []): array
    {
        $overrides = ['driver' => 'pdo_sqlite'];

        $overrides['memory'] = $this->isMemory($settings);

        // Map Laravel keys to Doctrine DBAL keys
        if (isset($settings['database'])) {
            $overrides['path'] = $settings['database'];
            uns

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key