public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
    {
        try {
            return new Uri($source);
        } catch (\InvalidArgumentException $exception) {
            return new Error('The given URI "%s" could not be converted', 1351594881, [$source]);
        }
    }
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
    {
        try {
            return new Uri($source);
        } catch (\InvalidArgumentException $exception) {
            return new Error('The given URI "%s" could not be converted', 1351594881, [$source]);
        }
    }
public function convertFrom ( $ source , $ targetType , array $ convertedChildProperties = [ ] , PropertyMappingConfigurationInterface $ configuration = null ) { try { return new Uri ( $ source ) ; } catch ( \ InvalidArgumentException $ exception ) { return new Error ( 'The given URI "%s" could not be converted' , 1351594881 , [ $ source ] ) ; } }
Converts the given string to a Uri object.

@param string $source The URI to be converted
@param string $targetType
@param array $convertedChildProperties
@param PropertyMappingConfigurationInterface $configuration
@return Uri|Error if the input format is not supported or could not be converted for other reasons
Converts the given string to a Uri object .