Permalink
Browse files

Allowing callback to be called for creation of Cache driver

  • Loading branch information...
mariano committed Mar 21, 2013
1 parent 48ef84f commit 4fa821d600933829e8181a1ef4e43fcce821468a
Showing with 4 additions and 2 deletions.
  1. +4 −2 extensions/data/source/Doctrine.php
@@ -41,7 +41,8 @@ public function __construct(array $config = array()) {
$defaults = array(
'models' => LITHIUM_APP_PATH . '/models',
'proxies' => LITHIUM_APP_PATH . '/models/proxies',
- 'proxyNamespace' => 'proxies'
+ 'proxyNamespace' => 'proxies',
+ 'cache' => null
);
$this->connectionSettings = array_diff_key($config, array_merge(
$defaults, array(
@@ -70,7 +71,8 @@ protected function createEntityManager() {
$configuration = Setup::createAnnotationMetadataConfiguration(
array($this->_config['models']),
Environment::is('development'),
- $this->_config['proxies']
+ $this->_config['proxies'],
+ isset($this->_config['cache']) ? call_user_func($this->_config['cache']) : null
);
$configuration->setProxyNamespace($this->_config['proxyNamespace']);

0 comments on commit 4fa821d

Please sign in to comment.