protected function _checkConfig( array $config, array $attributes )
	{
		$errors = array();

		foreach ( $config as $key => $def )
		{
			if( $def['required'] === true && ( !isset( $attributes[$key] ) || $attributes[$key] === '' ) )
			{
				$errors[$key] = sprintf( 'Required attribute "%1$s" in provider configuration not available', $key );
				continue;
			}

			if( isset( $attributes[$key] ) )
			{
				switch( $def['type'] )
				{
					case 'boolean':
						if( $attributes[$key] != '0' && $attributes[$key] != '1' ) {
							$errors[$key] = 'Not a true/false value'; continue 2;
						}
						break;
					case 'string':
						if( is_string( $attributes[$key] ) === false ) {
							$errors[$key] = 'Not a string'; continue 2;
						}
						break;
					case 'integer':
						if( ctype_digit( $attributes[$key] ) === false ) {
							$errors[$key] = 'Not an integer number'; continue 2;
						}
						break;
					case 'decimal':
					case 'float':
						if( is_numeric( $attributes[$key] ) === false ) {
							$errors[$key] = 'Not a number'; continue 2;
						}
						break;
					case 'datetime':
						$pattern = '/^[0-9]{4}-[0-1][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9]$';
						if( preg_match( $pattern, $attributes[$key] ) !== 1 ) {
							$errors[$key] = 'Invalid date and time'; continue 2;
						}
						break;
					case 'map':
						if( !is_array( $attributes[$key] ) ) {
							$errors[$key] = 'Not a valid map'; continue 2;
						}
						break;
					default:
						throw new MShop_Service_Exception( sprintf( 'Invalid characters in attribute for provider configuration. Attribute is not of type "%1$s".', $def['type'] ) );
				}
			}

			$errors[$key] = null;
		}

		return $errors;
	}