AMF-Perl

 view release on metacpan or  search on metacpan

doc/examples/sql/DataGlue.as  view on Meta::CPAN

	{
		result += tokens[i];
		result += (tokens[i+1] == "") ? "#" : record[tokens[i+1]];
	}	
	return result;
}

_global.DataGlue.getItemAt_FormatString = function(index)
{
	var record = this.dataProvider.getItemAt(index);
	if (record == "in progress" || record==undefined)
		return record;
	return {label: this.format(this.labelString, record), data: (this.dataString == null) ? record : this.format(this.dataString, record)};
}

_global.DataGlue.getItemAt_FormatFunction = function(index)
{	
	var record = this.dataProvider.getItemAt(index);
	if (record == "in progress" || record==undefined)
		return record;
	return this.formatFunction(record);
}

_global.DataGlue.prototype.getItemID = function(index)
{
	return this.dataProvider.getItemID(index);
}

_global.DataGlue.prototype.addItemAt = function(index, value)

lib/AMF/Perl/IO/Deserializer.pm  view on Meta::CPAN


sub readASObject
{
    my ($self)=@_;

    #object Button, object Textformat, object Sound, object Number, object Boolean, object String, 
    #SharedObject unflushed, XMLNode, used XMLSocket??, NetConnection,
    #SharedObject.data, SharedObject containing 'private' properties

    #the final byte seems to be the dataType -> 0D
    return undef;
}

# main switch function to process all of the data types
sub readData
{
    my ($self, $type) = @_;
    my $data;
#print STDERR "Reading data of type $type\n";
    if ($type == 0) # number
    {	

lib/AMF/Perl/IO/Deserializer.pm  view on Meta::CPAN

    elsif ($type == 2) # string
    {
        $data = $self->readString();
    }
    elsif ($type == 3) # object Object
    {
        $data = $self->readObject();
    }
    elsif ($type == 5) # null
    {
        $data = undef;
    }
    elsif ($type == 6) # undefined
    {
        $data = undef;
    }
    elsif ($type == 7) # flushed SharedObject containing 'public' properties
    {
        $data = $self->readFlushedSO(); 
    }
    elsif ($type == 8) # array
    {
        # shared object format only (*.sol) 
        # only time I saw it was the serverinfo value in a ColdFusion RecordSet
        # It was just four zeroes - skip them.

lib/AMF/Perl/IO/Serializer.pm  view on Meta::CPAN


=head2 Sat Mar 13 16:25:00 EST 2004

=item Patch from Tilghman Lesher that detects numbers and dates in strings
and sets return type accordingly.

=item Patch from Kostas Chatzikokolakis handling encoding and sending null value.

=head2 Sun May 11 16:43:05 EDT 2003

=item Changed writeData to set type to "NULL" when the incoming data is undef. Previously
it became a String, just like other scalars.

=item Changed PHP's writeRecordset to a generic writeAMFObject. Verified Recordset support.

=head2 Sun Mar  9 18:20:16 EST 2003

=item Function writeObject should return the same as writeHash. This assumes that all meaningful data
are stored as hash keys.

=cut

lib/AMF/Perl/IO/Serializer.pm  view on Meta::CPAN

#    Since we are now allowing the user to determine
#    the datatype we have to validate the user's suggestion
#    vs. the actual data being passed and throw an error
#    if things don't check out.!!!!
#    **********************************************

    # get the type of the data by checking its reference name
    #if it was not explicitly passed
    if ($type eq "unknown")
    {
		if (!defined $d)		# convert undef to null, but not "" or 0
		{
			$type = "NULL";
		}
		else
		{
        my $myRef = ref $d;

        if (!$myRef || $myRef =~ "SCALAR")
        {
			if ($myRef) {



( run in 1.724 second using v1.01-cache-2.11-cpan-d80b1682f3f )