Created
June 3, 2015 12:56
-
-
Save andybeak/a854c3978bead83fa4c3 to your computer and use it in GitHub Desktop.
Client config for Doctrine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Doctrine\ORM\Tools\Console\ConsoleRunner; | |
use Doctrine\ORM\Tools\Setup; | |
use Doctrine\ORM\EntityManager; | |
$paths = ['/home/andy/development/metagrated/poc/restengine/app/Lib/Domain/Mappings']; | |
require_once __DIR__.'/../../../../bootstrap/autoload.php'; | |
$paths = [ __DIR__ ]; | |
$dbParams = array( | |
'driver' => 'pdo_pgsql', | |
'user' => 'metagrated', | |
'password' => 'metagrated', | |
'dbname' => 'metagrated', | |
'host' => 'localhost', | |
'prefix' => '', | |
); | |
$config = Setup::createYamlMetadataConfiguration($paths, true); | |
$entityManager = EntityManager::create($dbParams, $config); | |
return ConsoleRunner::createHelperSet($entityManager); | |
https://www.rescuetime.com/blocked/url/http://boingboing.net |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment