Revision 225 (by ahitrov, 2012/06/27 17:59:40) Serialize

<%args>

        $name	=> undef
        $SETS	=> undef
	$object	=> undef

</%args>

<%init>

	return  undef   if (! ref($SETS));
	return  undef   if (! $name);

	my $FIELDS = {};
	while (my ($element,$value)=each %{$SETS}) {
		if ($element =~ /^${name}_key_(\d+)$/ && $SETS->{"${name}_value_$1"}) {
			$FIELDS->{$value}=$SETS->{"${name}_value_$1"};
		}
	}
	return $object->_serialize($FIELDS);

</%init>