diff --git a/README.md b/README.md index 7ec769a..87e90a6 100644 --- a/README.md +++ b/README.md @@ -31,13 +31,15 @@ Then open `config/application.config.php` and add `DoctrineModule`, `DoctrineORM #### Registering Fixtures -To register drivers with Doctrine module simply add the drivers to the doctrine.driver key in your configuration. +To register fixtures with Doctrine module add the fixtures to the doctrine key in your configuration. ```php array( - 'ModuleName_fixture' => __DIR__ . '/../src/ModuleName/Fixture', + 'doctrine' => array( + 'fixture' => array( + 'ModuleName_fixture' => __DIR__ . '/../src/ModuleName/Fixture', + ) ), ); ``` @@ -47,6 +49,7 @@ return array( #### Command Line Access the Doctrine command line as following +##Import ```sh -./vendor/bin/doctrine-module +./vendor/bin/doctrine-module data-fixture:import ``` diff --git a/src/DoctrineDataFixtureModule/Service/FixtureFactory.php b/src/DoctrineDataFixtureModule/Service/FixtureFactory.php index ee74528..223ec56 100644 --- a/src/DoctrineDataFixtureModule/Service/FixtureFactory.php +++ b/src/DoctrineDataFixtureModule/Service/FixtureFactory.php @@ -51,16 +51,11 @@ public function createService(ServiceLocatorInterface $sl) */ public function getOptions(ServiceLocatorInterface $sl, $key) { - $options = $sl->get('Configuration'); - if (!isset($options['data-fixture'])) { + $options = $sl->get('config'); + if (!isset($options['doctrine']['fixture'])) { return array(); } - return $options['data-fixture']; - } - - public function getOptionsClass() - { - return 'DoctrineDataFixtureModule\Options\Fixture'; + return $options['doctrine']['fixture']; } }