Added clear()

This commit is contained in:
Bez Hermoso 2014-08-07 12:23:55 -07:00
parent a5a13501e2
commit 480fcc5ecd
2 changed files with 7 additions and 2 deletions

View File

@ -322,6 +322,7 @@ class SwaggerFormatter implements FormatterInterface
} }
$apiDeclaration['models'] = $this->modelRegistry->getModels(); $apiDeclaration['models'] = $this->modelRegistry->getModels();
$this->modelRegistry->clear();
return $apiDeclaration; return $apiDeclaration;
} }

View File

@ -34,8 +34,6 @@ class ModelRegistry
protected $classes = array(); protected $classes = array();
protected $classMap = array();
/** /**
* @var callable * @var callable
*/ */
@ -241,4 +239,10 @@ class ModelRegistry
{ {
return $this->models; return $this->models;
} }
public function clear()
{
$this->models = array();
$this->classes = array();
}
} }