Doctrine2 extensions
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/Webmasters/Doctrine
.gitignore
LICENSE
README.md
composer.json

README.md

doctrine-extensions for PHP 7.1+

Webmasters Doctrine Extensions

Just Another Doctrine2 Extension

Bootstrap

<?php

// MySQL database configuration
$connectionOptions = [
    'default' => [
        'driver' => 'pdo_mysql',
        'dbname' => 'example_db',
        'host' => 'localhost',
        'user' => 'root',
        'password' => '',
        'prefix' => '',
    ],
];

// Application/Doctrine configuration
$applicationOptions = [
    'debug_mode' => true, // in production environment false
];

// Use Composer autoloading
require_once 'vendor/autoload.php';

// Get Doctrine entity manager
$bootstrap = Webmasters\Doctrine\Bootstrap::getInstance(
    $connectionOptions,
    $applicationOptions
);

$em = $bootstrap->getEm();

Idea

Jan Teriete