[2.0] Applied convention over configuration using default cache implementation if none is defined in AnnotationReader.
This commit is contained in:
parent
81d02278ad
commit
30712c6cb5
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user