Commit 30712c6c authored by guilhermeblanco's avatar guilhermeblanco

[2.0] Applied convention over configuration using default cache implementation...

[2.0] Applied convention over configuration using default cache implementation if none is defined in AnnotationReader.
parent 81d02278
......@@ -65,12 +65,12 @@ class AnnotationReader
* Constructor. Initializes a new AnnotationReader that uses the given
* 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->_cache = $cache;
$this->_cache = $cache ?: new Doctrine\Common\Cache\ArrayCache;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment