Overview

Namespaces

  • Jyxo
    • Beholder
      • TestCase
    • Gettext
      • Parser
    • Input
      • Chain
      • Filter
      • Validator
    • Mail
      • Email
        • Attachment
      • Parser
      • Sender
    • Rpc
      • Json
      • Xml
    • Shell
    • Spl
    • Svn
    • Time
    • Webdav
  • PHP

Classes

  • Client
  • Server

Exceptions

  • Exception
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated

Class Server

Class for creating a RPC server.

Direct known subclasses

Jyxo\Rpc\Json\Server, Jyxo\Rpc\Xml\Server
Abstract
Namespace: Jyxo\Rpc
Category: Jyxo
Package: Jyxo\Rpc
Copyright: Copyright (c) 2005-2011 Jyxo, s.r.o.
License: https://github.com/jyxo/php/blob/master/license.txt
Author: Jaroslav HanslĂ­k
Located at Rpc/Server.php
Methods summary
protected
# __construct( )

Creates a class instance.

Creates a class instance.

public
# __destruct( )

Destroys a class instance.

Destroys a class instance.

final public
# __clone( )

Prevents from singleton cloning.

Prevents from singleton cloning.

Throws

LogicException
When trying to clone instance
public static Jyxo\Rpc\Server
# getInstance( )

Returns class instance.

Returns class instance.

Returns

Jyxo\Rpc\Server
public Jyxo\Rpc\Server
# enableLogging( string $filename, callback $callback = null )

Turns on logging.

Turns on logging.

Parameters

$filename
string
Log file path.
$callback
callback
Function to be called prior to logging a message.

Returns

Jyxo\Rpc\Server

Throws

InvalidArgumentException
If no file or an invalid callback was provided.
public Jyxo\Rpc\Server
# registerClass( string $class, boolean $useFullName = true )

Registers class public methods.

Registers class public methods.

Parameters

$class
string
Class name
$useFullName
boolean
Register with class name

Returns

Jyxo\Rpc\Server

Throws

InvalidArgumentException
If no such class exists
public Jyxo\Rpc\Server
# registerMethod( string $class, string $method, boolean $useFullName = true )

Registers given method of given class. Method does not necessarily have to exist if __call or __callStatic method is defined.

Registers given method of given class. Method does not necessarily have to exist if __call or __callStatic method is defined.

Parameters

$class
string
Class name
$method
string
Function name
$useFullName
boolean
Register with class name

Returns

Jyxo\Rpc\Server

Throws

InvalidArgumentException
If no such class exists or method is not public
public Jyxo\Rpc\Server
# registerFunc( string $func )

Registers given function.

Registers given function.

Parameters

$func
string
Function name

Returns

Jyxo\Rpc\Server

Throws

InvalidArgumentException
If no such function exists
abstract protected
# register( string $func )

Actually registers a function to a server method.

Actually registers a function to a server method.

Parameters

$func
string
Function name
abstract public
# process( )

Processes a request and sends a RPC response.

Processes a request and sends a RPC response.

protected mixed
# call( string $method, array $params )

Calls a server method with given parameters.

Calls a server method with given parameters.

Parameters

$method
string
Method name
$params
array
Method parameters

Returns

mixed
Jyxo PHP Library API documentation generated by ApiGen 2.3.0