PHPackages                             warpsale/ws-apigility-doctrine - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. warpsale/ws-apigility-doctrine

ActiveLibrary[API Development](/categories/api)

warpsale/ws-apigility-doctrine
==============================

Warpsale Doctrine integration with Apigility

0331PHP

Since Sep 14Pushed 10y ago1 watchersCompare

[ Source](https://github.com/warpsale/ws-apigility-doctrine)[ Packagist](https://packagist.org/packages/warpsale/ws-apigility-doctrine)[ RSS](/packages/warpsale-ws-apigility-doctrine/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

warpsale/ws-apigility-doctrine
==============================

[](#warpsalews-apigility-doctrine)

Warpsale Doctrine integration with Apigility

Installation (with composer):

- Install Apigility;
- Install Doctrine;
- Install doctrine/doctrine-orm-module;
- Install warpsale/ws-apigility-doctrine.

Setup:

- Copy the "\_utils/module/Base" folder to the "/module" folder of Apigility;
- Add the "Base" module to the "/config/modules.config.php" Apigility file;
- Append to the "/config/autoload/local.php" Apigility file:

```
'doctrine' => array(
'connection' => array(
   'orm_default' => array(
       'driverClass' => 'Doctrine\\DBAL\\Driver\\PDOPgSql\\Driver',
       'params' => array(
           'host' => 'hostname',
           'port' => '5432',
           'user' => 'username',
           'password' => 'password',
           'dbname' => 'database',
       ),
   ),
),
'hydrators' => [
   'initializers' => [
       'Base\V1\Model\BaseHydratorInitializer',
    ],
],
```

- Create a new API (Geo, for example).
- Create a new REST Service (Region, for example)
- Create the folder "Model" inside the "/module/Geo/src/Geo/V1" Apigility folder and Copy your Doctrine Entity Files. Region.php example:

```
