From 30712c6cb544bfc83e50e030e5e5a8ccd6eabc35 Mon Sep 17 00:00:00 2001 From: guilhermeblanco Date: Sun, 21 Feb 2010 15:55:29 +0000 Subject: [PATCH] [2.0] Applied convention over configuration using default cache implementation if none is defined in AnnotationReader. --- lib/Doctrine/Common/Annotations/AnnotationReader.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/Common/Annotations/AnnotationReader.php b/lib/Doctrine/Common/Annotations/AnnotationReader.php index 36354fef1..bf9b488f2 100644 --- a/lib/Doctrine/Common/Annotations/AnnotationReader.php +++ b/lib/Doctrine/Common/Annotations/AnnotationReader.php @@ -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; } /**