AMF-Perl

 view release on metacpan or  search on metacpan

doc/code.html  view on Meta::CPAN

    my ($self, $data) = @_;
    return $data;
}

sub methodTable
{
    return {
        "echoNormal" => {
            "description" => "Echoes the passed argument back to Flash (no need to set the return t
ype)",
            "access" => "remote", # available values are private, public, remote
        },
        "echoDate" => {
            "description" => "Echoes a Flash Date Object (the returnType needs setting)",
            "access" => "remote", # available values are private, public, remote
            "returns" => "date"
        },
        "echoXML" => {
            "description" => "Echoes a Flash XML Object (the returnType needs setting)",
            "access" => "private", # available values are private, public, remote
            "returns" => "xml"
        }
    };
}

1;
</textarea>
</td>
<td valign=top>
<textarea cols=50 rows=40>

doc/code.html  view on Meta::CPAN

    def echoDate(self, arg):
        return arg

    def echoXML(self, arg):
        return arg

    def methodTable(self):
        table = {}
        table["echoNormal"]= {
                    "description" : "Echoes the passed argument back to Flash (no need to set the return type)",
                    "access" : "remote", # available values are private, public, remote
            }
        table["echoDate"] = {
                    "description" : "Echoes a Flash Date Object (the returnType needs setting)",
                    "access" : "remote", # available values are private, public, remote
                    "returns" : "date"
            }
        table["echoXML"] = {
                    "description" : "Echoes a Flash XML Object (the returnType needs setting)",
                    "access" : "private", # available values are private, public, remote
                    "returns" : "xml"
            }
        return table
</textarea>
</td></tr></table>

      </td>
    </tr>
  </tbody>
</table>

doc/examples/basic/basicservices/DataEcho.pm  view on Meta::CPAN

    bless $self, $proto;
    return $self;
}


sub methodTable
{
    return {
        "echoNormal" => {
            "description" => "Echoes the passed argument back to Flash (no need to set the return type)",
            "access" => "remote", # available values are private, public, remote
        },
        "echoDate" => {
            "description" => "Echoes a Flash Date Object (the returnType needs setting)",
            "access" => "remote", # available values are private, public, remote
            "returns" => "date"
        },
        "echoXML" => {
            "description" => "Echoes a Flash XML Object (the returnType needs setting)",
            "access" => "remote", # available values are private, public, remote
            "returns" => "xml"
        },
        "generateError" => {
            "description" => "Throw an error so that _status, not _result on the client side is called",
            "access" => "remote", # available values are private, public, remote
        },
    };
}

sub echoNormal
{
    my ($self, $data) = @_;
    return $data;
}
sub echoDate

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


use 5.00000;
use strict;

require Exporter;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
@ISA = qw(Exporter);

# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.

# This allows declaration	use AMF::Perl ':all';
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
# will save memory.
%EXPORT_TAGS = ( 'all' => [ qw(
	
) ] );

@EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );

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

	from_to($rawXML, "utf8", $self->{encoding}) if $self->{encoding};
    
    # maybe parse the XML into a PHP XML structure??? or leave it to the developer
    
    # return the xml
    return $rawXML;
}
sub readFlushedSO
{
    my ($self)=@_;
    # receives [type(07) 00 00] if SO is flushed and contains 'public' properties
    # see debugger readout ???
    return $self->{inputStream}->readInt();
}

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

    #object Button, object Textformat, object Sound, object Number, object Boolean, object String, 
    #SharedObject unflushed, XMLNode, used XMLSocket??, NetConnection,

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

        $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.
        for (my $i=0; $i<4; $i++)
        {



( run in 0.421 second using v1.01-cache-2.11-cpan-64827b87656 )