Overview

Namespaces

  • NGS
    • Client
      • Exception
    • Converter
    • Patterns
  • PHP

Classes

  • ApplicationProxy
  • CrudProxy
  • DomainProxy
  • HttpRequest
  • QueryString
  • ReportingProxy
  • RestHttp
  • StandardProxy
  • Overview
  • Namespace
  • Class
  • Tree

Class ApplicationProxy

Proxy service to remote RPC-like API

Remote services can be called using their name

Namespace: NGS\Client
Package: NGS\Client
Located at Client/ApplicationProxy.php
Methods summary
public
# __construct( NGS\Client\RestHttp $http = null )

Create a new ApplicationProxy instance

Create a new ApplicationProxy instance

Parameters

$http
NGS\Client\RestHttp
$http RestHttp instance used for http request. Optionally specify an instance, otherwise use a singleton instance
public static NGS\Client\ApplicationProxy
# instance( )

Gets singleton instance of RestApplication.svc proxy

Gets singleton instance of RestApplication.svc proxy

Returns

NGS\Client\ApplicationProxy
public mixed
# get( mixed $command, array $expectedCode = array(200), string $accept = 'application/json' )

If remote service doesn't require any arguments it can be called using get method.

If remote service doesn't require any arguments it can be called using get method.

Parameters

$command
mixed
$command
$expectedCode
array
$expectedCode
$accept
string
$accept

Returns

mixed
public mixed
# post( string $command, array $data = null, array $expectedCode = array(200), string $accept = 'application/json' )

When remote service requires an argument, message with serialized payload will be sent.

When remote service requires an argument, message with serialized payload will be sent.

Parameters

$command
string
$command
$data
array
$data
$expectedCode
array
$expectedCode
$accept
string
$accept

Returns

mixed
public mixed
# postJson( string $command, string $data = null, array $expectedCode = array(200), string $accept = 'application/json' )

As NGS\Client\ApplicationProxy::post(), when arguments are already serialized in JSON

As NGS\Client\ApplicationProxy::post(), when arguments are already serialized in JSON

Parameters

$command
string
$command
$data
string
$data JSON encoded data
$expectedCode
array
$expectedCode
$accept
string
$accept

Returns

mixed
Constants summary
string APPLICATION_URI 'RestApplication.svc'
#
Properties summary
protected mixed $http
#
protected static mixed $instance
#
API documentation generated by ApiGen 2.8.0