private function newInstanceBy($classUid)
{
foreach ($this->configuration as $config) {
if ($config['class_uid'] == $classUid) {
/** @var Model $repository */
$repository = $config['repository'];
return $repository->newInstance();
}
}
throw new \InvalidArgumentException("Can't find class for classUid: '{$classUid}'.");
}