mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 07:41:43 +03:00
Added clear()
This commit is contained in:
parent
a5a13501e2
commit
480fcc5ecd
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user