• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/configuration/dataprovider/controller.php
  • Класс: BitrixRestConfigurationDataProviderController
  • Вызов: Controller::getProvider
private function getProvider(string $class, array $setting = []): ?ProviderBase
{
	$result = null;
	if ($class && class_exists($class))
	{
		$this->resetErrors();
		try
		{
			$object = new $class($setting);
			if ($object instanceof ProviderBase)
			{
				$result = $object;
			}
		}
		catch (SystemException $error)
		{
			$this->setError($error->getCode(), $error->getMessage());
		}
	}

	return $result;
}