PHP code example of ckuran / doctrine4legacy
1. Go to this page and download the library: Download ckuran/doctrine4legacy library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ckuran / doctrine4legacy example snippets
define('ROOT', __DIR__ . '/');
if (file_exists(ROOT . '.env')) {
$env = new Dotenv();
$env->load(ROOT . '.env');
}
$em = DoctrineWrapper::getEntityManager();
$dbal = DoctrineWrapper::getConnection();
$em = DoctrineWrapper::getEntityManager('customPrefix');
$dbal = DoctrineWrapper::getConnection('customPrefix');