Nqxcode\LuceneSearch\Model\Config::newInstanceBy PHP Метод

newInstanceBy() приватный Метод

Create instance of model by class UID.
private newInstanceBy ( $classUid ) : Model
$classUid
Результат Illuminate\Database\Eloquent\Model
    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}'.");
    }