Skip to content

Commit

Permalink
Removed the default annotation driver.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Spraggs committed Nov 4, 2011
1 parent 9b40f66 commit d1fb130
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
13 changes: 6 additions & 7 deletions configs/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@
'proxy-dir' => __DIR__ . '/src/SpiffyDoctrine/Proxy',
'proxy-namespace' => 'SpiffyDoctrine\Proxy',
'metadata-driver-impl' => array(
'doctrine-annotationdriver' => array(
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
'namespace' => 'SpiffyDoctrine',
'paths' => array(),
'cache-class' => 'Doctrine\Common\Cache\ArrayCache',
'cache-namespace' => 'doctrine_annotation',
)
// 'application-annotation-driver' => array(
// 'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
// 'namespace' => 'My\Entity\Namespace',
// 'paths' => array('/path/to/entities'),
// 'cache-class' => 'Doctrine\Common\Cache\ArrayCache',
// )
),
'metadata-cache-impl' => 'Doctrine\Common\Cache\ArrayCache',
'query-cache-impl' => 'Doctrine\Common\Cache\ArrayCache',
Expand Down
8 changes: 6 additions & 2 deletions docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ SpiffyDoctrine key to your modules array before your Application module key.
),
'config' => array(
'metadata-driver-impl' => array(
'doctrine-annotationdriver' => array(
// to add multiple drivers just follow the format below and give them a different keyed name
// cache-class is only required for annotation drivers
'application-annotation-driver' => array(
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
'namespace' => 'My\Entity\Namespace',
'paths' => array('path/to/your/entities')
'paths' => array('/some/path/to/entities'),
'cache-class' => 'Doctrine\Common\Cache\ArrayCache',
)
)
)
Expand Down
5 changes: 2 additions & 3 deletions src/SpiffyDoctrine/Service/Doctrine.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ class Doctrine
*/
protected $_annotationDriverDefinition = array(
'required' => array(
'cache-class' => 'string',
'cache-namespace' => 'string',
'cache-class' => 'string'
)
);

Expand Down Expand Up @@ -322,7 +321,7 @@ protected function _createEventManager(array $opts)
/**
* Creates a driver chain based on passed parameters. Drivers should, at minimum,
* specify the class, namespace, and paths. AnnotationDrivers have two additional
* options 'cache-class' and 'cache-namespace' that are required.
* options 'cache-class' that are required.
*
* @todo allow setting own driver chain extended from ORM\Mapping\Driver\DriverChain
* @param array $drivers
Expand Down

0 comments on commit d1fb130

Please sign in to comment.