RestService::validateProvider: Bitrix method

      
<?php 
//  Bitrix\Bizproc\RestService :: validateProvider()
//  /dist/bitrix/modules/bizproc/lib/restservice.php:1409

    
private static function validateProvider($data$server)
    {
        if (!
is_array($data) || empty($data))
            throw new 
RestException('Empty data!'self::ERROR_ACTIVITY_VALIDATION_FAILURE);

        static::
validateActivityCode($data['CODE']);
        static::
validateActivityHandler($data['HANDLER'], $server);
        if (empty(
$data['NAME']))
            throw new 
RestException('Empty provider NAME!'self::ERROR_ACTIVITY_VALIDATION_FAILURE);

        if (empty(
$data['TYPE']))
            throw new 
RestException('Empty provider TYPE!'self::ERROR_ACTIVITY_VALIDATION_FAILURE);

        if (!
in_array($data['TYPE'], RestProviderTable::getTypesList(), true))
            throw new 
RestException('Unknown provider TYPE!'self::ERROR_ACTIVITY_VALIDATION_FAILURE);
    }