PHP 8.2.31
Preview: marshal.rb Size: 1.46 KB
//proc/thread-self/root/opt/alt/ruby21/lib64/ruby/2.1.0/xmlrpc/marshal.rb

#
# Copyright (C) 2001, 2002, 2003 by Michael Neumann (mneumann@ntecs.de)
#
# $Id: marshal.rb 36958 2012-09-13 02:22:10Z zzak $
#

require "xmlrpc/parser"
require "xmlrpc/create"
require "xmlrpc/config"
require "xmlrpc/utils"

module XMLRPC # :nodoc:

  # Marshalling of XMLRPC::Create#methodCall and XMLRPC::Create#methodResponse
  class Marshal
    include ParserWriterChooseMixin

    class << self

      def dump_call( methodName, *params )
        new.dump_call( methodName, *params )
      end

      def dump_response( param )
        new.dump_response( param )
      end

      def load_call( stringOrReadable )
        new.load_call( stringOrReadable )
      end

      def load_response( stringOrReadable )
        new.load_response( stringOrReadable )
      end

      alias dump dump_response
      alias load load_response

    end # class self

    def initialize( parser = nil, writer = nil )
      set_parser( parser )
      set_writer( writer )
    end

    def dump_call( methodName, *params )
      create.methodCall( methodName, *params )
    end

    def dump_response( param )
      create.methodResponse( ! param.kind_of?( XMLRPC::FaultException ) , param )
    end

    # Returns <code>[ methodname, params ]</code>
    def load_call( stringOrReadable )
      parser.parseMethodCall( stringOrReadable )
    end

    # Returns +paramOrFault+
    def load_response( stringOrReadable )
      parser.parseMethodResponse( stringOrReadable )[1]
    end

  end # class Marshal

end

Directory Contents

Dirs: 0 × Files: 10

Name Size Perms Modified Actions
1.41 KB lrw-r--r-- 2012-09-13 02:22:10
Edit Download
18.84 KB lrw-r--r-- 2016-02-25 10:29:39
Edit Download
989 B lrw-r--r-- 2013-07-18 13:50:32
Edit Download
6.53 KB lrw-r--r-- 2012-09-13 02:22:10
Edit Download
3.53 KB lrw-r--r-- 2013-12-06 02:10:11
Edit Download
4.13 KB lrw-r--r-- 2013-12-09 07:04:43
Edit Download
1.46 KB lrw-r--r-- 2012-09-13 02:22:10
Edit Download
20.01 KB lrw-r--r-- 2012-11-16 16:55:29
Edit Download
19.81 KB lrw-r--r-- 2013-12-07 10:27:27
Edit Download
3.91 KB lrw-r--r-- 2012-09-13 02:22:10
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).