1
0
mirror of synced 2025-01-20 23:41:39 +03:00

[2.0] Applied convention over configuration using default cache implementation if none is defined in AnnotationReader.

This commit is contained in:
guilhermeblanco 2010-02-21 15:55:29 +00:00
parent 81d02278ad
commit 30712c6cb5

View File

@ -65,12 +65,12 @@ class AnnotationReader
* Constructor. Initializes a new AnnotationReader that uses the given * Constructor. Initializes a new AnnotationReader that uses the given
* Cache provider. * Cache provider.
* *
* @param Cache $cache The cache provider to use. * @param Cache $cache The cache provider to use. If none is provided, ArrayCache is used.
*/ */
public function __construct(Cache $cache) public function __construct(Cache $cache = null)
{ {
$this->_parser = new Parser; $this->_parser = new Parser;
$this->_cache = $cache; $this->_cache = $cache ?: new Doctrine\Common\Cache\ArrayCache;
} }
/** /**