# Application

class Application extends Application

Application Class

## Constants

PROTOCOL_VERSION |

## Properties

static protected multiple: | $_instances | Array of \jtl\Connector\Core\Utilities\Singleton Objects | from Singleton
protected IEndpointConnector | $connector | Connected EndpointConnectors |
protected Config; | $config |  |
protected Session | $session | Global Session |
protected EventDispatcher | $eventDispatcher |  |
protected IErrorHandler | $errorHandler |  |

## Methods

static Singleton:
getInstance()

Basic Singleton implementation

from Singleton
__construct()

Basic Constructor

__clone()

Clone Method

from Singleton
run()

(non-PHPdoc)

execute(RequestPacket $requestpacket, $rpcmode, array $imagePaths = array())

No description

register(IEndpointConnector $endpointconnector)

No description

runSingle(RequestPacket $requestpacket, integer $rpcmode)

Single Mode

runBatch(array $requestpackets, integer $rpcmode)

Batch Mode

deserializeRequestParams(RequestPacket $requestpacket, $modelNamespace)

No description

ResponsePacket
buildRpcResponse(RequestPacket $requestpacket, Action $actionresult)

Build RPC Reponse Packet

runActionValidation(RequestPacket $requestpacket)

Validate Action

runModelValidation(RequestPacket $requestpacket)

Validate Model

startConfiguration()

Initialises the connector configuration instance.

startSession($sessionId = null, $method)

Starting Session

startEventDispatcher()

No description

handleImagePush(RequestPacket $requestpacket, array $imagePaths = array())

No description

triggerRpcAfterEvent($data, $method)

No description

IEndpointConnector
getConnector()

Connector getter

Session
getSession()

Session getter

int
getProtocolVersion()

No description

Config
getConfig()

No description

IErrorHandler
getErrorHandler()

No description

$this
setErrorHandler(IErrorHandler $handler)

No description

## Details

###
in Singleton at line 29
`static Singleton: getInstance()`

Basic Singleton implementation

#### Return Value

Singleton: |

###
at line 85
`protected __construct()`

Basic Constructor

###
in Singleton at line 49
`final protected __clone()`

Clone Method

###
at line 98
`run()`

(non-PHPdoc)

#### See also

\jtl\Connector\Core\Application\Application::run() |

###
at line 174
`protected execute(RequestPacket $requestpacket, $rpcmode, array $imagePaths = array())`

#### Parameters

RequestPacket | $requestpacket |
| $rpcmode |
array | $imagePaths |

###
at line 313
`register(IEndpointConnector $endpointconnector)`

#### Parameters

IEndpointConnector | $endpointconnector |

###
at line 324
`protected runSingle(RequestPacket $requestpacket, integer $rpcmode)`

Single Mode

#### Parameters

RequestPacket | $requestpacket |
integer | $rpcmode |

###
at line 401
`protected runBatch(array $requestpackets, integer $rpcmode)`

Batch Mode

#### Parameters

array | $requestpackets |
integer | $rpcmode |

###
at line 428
`protected deserializeRequestParams(RequestPacket $requestpacket, $modelNamespace)`

#### Parameters

RequestPacket | $requestpacket |
| $modelNamespace |

###
at line 485
`protected ResponsePacket buildRpcResponse(RequestPacket $requestpacket, Action $actionresult)`

Build RPC Reponse Packet

#### Parameters

RequestPacket | $requestpacket |
Action | $actionresult |

#### Return Value

ResponsePacket |

#### Exceptions

RpcException |

###
at line 504
`protected runActionValidation(RequestPacket $requestpacket)`

Validate Action

#### Parameters

RequestPacket | $requestpacket |

#### Exceptions

SchemaException |

###
at line 521
`protected runModelValidation(RequestPacket $requestpacket)`

Validate Model

#### Parameters

RequestPacket | $requestpacket |

#### Exceptions

SchemaException |

###
at line 539
`protected startConfiguration()`

Initialises the connector configuration instance.

###
at line 584
`protected startSession($sessionId = null, $method)`

Starting Session

#### Parameters

| $sessionId |
| $method |

#### Exceptions

DatabaseException |
SessionException |

###
at line 604
`protected startEventDispatcher()`

###
at line 614
`protected handleImagePush(RequestPacket $requestpacket, array $imagePaths = array())`

#### Parameters

RequestPacket | $requestpacket |
array | $imagePaths |

###
at line 694
`protected triggerRpcAfterEvent($data, $method)`

#### Parameters

| $data |
| $method |

###
at line 705
`IEndpointConnector getConnector()`

Connector getter

#### Return Value

IEndpointConnector |

###
at line 715
`Session getSession()`

Session getter

#### Return Value

Session |

###
at line 723
`int getProtocolVersion()`

#### Return Value

int |

###
at line 731
`Config getConfig()`

#### Return Value

Config |

###
at line 739
`IErrorHandler getErrorHandler()`

#### Return Value

IErrorHandler |

###
at line 748
`$this setErrorHandler(IErrorHandler $handler)`

#### Parameters

IErrorHandler | $handler |

#### Return Value

$this |