Commit 62712458 authored by beberlei's avatar beberlei

[2.0] DDC-318 - Fix successive calls to AnnotationDriver::getAllClassNames()

parent 6bfbab9f
......@@ -63,6 +63,11 @@ class AnnotationDriver implements Driver
*/
protected $_fileExtension = '.php';
/**
* @param array
*/
protected $_classNames = null;
/**
* Initializes a new AnnotationDriver that uses the given AnnotationReader for reading
* docblock annotations.
......@@ -407,6 +412,10 @@ class AnnotationDriver implements Driver
*/
public function getAllClassNames()
{
if ($this->_classNames !== null) {
return $this->_classNames;
}
$classes = array();
if ($this->_paths) {
......@@ -440,6 +449,8 @@ class AnnotationDriver implements Driver
}
}
$this->_classNames = $classes;
return $classes;
}
......
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