2017 © Pedro Peláez
 

library doctrineconfig

Utility config doctrine

image

brenodouglas/doctrineconfig

Utility config doctrine

  • Saturday, August 1, 2015
  • by breninho94
  • Repository
  • 1 Watchers
  • 0 Stars
  • 125 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Doctrine configuration for Respect/Rest

Integration doctrine in project Respect/Rest, (*1)

Require PHP >= 5.3, (*2)

In index.php, (*3)

  require 'autoload.php';

  \RespectDoctrine\Doctrine\Doctrine::setConfigDir("config.php");
  $doctrine = new Doctrine();
  $em = $doctrine->getEntityManager();

In config.php, (*4)

return [
  'database' => [

      'default' => 'mysql',

      'mysql' => [
          'dbname' => "application",
          'user' => 'root',
          'port' => null,
          'password' => '',
          'host' => 'localhost',
          'driver' => 'pdo_mysql'
      ],

      'pgsql' => [
          'dbname' => "application",
          'user' => 'root',
          'port' => 5232,
          'password' => '',
          'host' => 'localhost',
          'driver' => 'pdo_pgsql'
      ]

  ],

  'doctrine' => [
      /** Namespaces on Entity mapped */
      'entity' => [
          __DIR__."/Api/Entity"
      ],
      /** Dir of metadatas generate */
      'metadata' => __DIR__."/../cache/doctrine"
  ]
];

The Versions