Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Modular Doctrine setup/bootstrapping for Zend Framework(1)
PHP

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
docs
src/EasyBib/Doctrine
tests
.gitignore
.travis.yml
README.md
composer.json
composer.phar
phpunit.xml

README.md

EasyBib DoctrineResource

Build Status

A wrapper for setting up the Doctrine EntityManager to use it in all modules of EasyBib. It assumes you're using a ZF MVC application with modules placed inside an "app" folder.

Installation & Configuration

  1. Use composer to add EasyBib_DoctrineResource as dependency
  2. Drop in a doctrine.ini into your config folder - see docs folder for an example
  3. Use it!

Usage

  1. Load your doctrine.ini with Zend_Config_Ini or ez_Core_LoadConfig (Zend_Config_Ini object is needed!)
  2. Set the options of Resource:

  3. Initialize DoctrineResource by:

    $doctrineResource =  new \EasyBib\Doctrine\DoctrineResource(                            
        $doctrineIniConfig, // your doctrine.ini settings
        $root,              // path to your app root folder
        'default',          // zf mvc module name you want to use the DoctrineResource from
        $options            // the options array for loading needed PlugIns, can be an empty array()
     );
    
  4. Use the Doctrine EntityManager:

    $em = $doctrineResource->getEntityManager();
    
  5. Have fun with Doctrine!

Something went wrong with that request. Please try again.