Class: Webservice extends ErrorHandler

addError ($rule, $name=NULL, $param=-1) [ErrorHandler]

verejna metoda pre pridanie chyby umoznujuca nastavit chybu objektu externe

exec ($data=NULL, $prepareMulti=false, $multiIndex=0)

Execute prepared response or response with data defined in $data
- data of reponse, will overwrite predefined responses
$prepareMulti - set true for return handle for response
$multiIndex - index of predefined respons, which should be loaded
return - $this for $prepareMulti=true or returns curl handle

get ($type='CONTENT')

get reponse in one of supported formats:
$type - format of reponse, one of BODY, HEADER, ALL, JSON, JSON_OBJECT, SERIALIZE

getError ($key=NULL) [ErrorHandler]

vrati chybu z pola chyb
$key- ak je zadany, nevracia nasledujucu, ale konkretnu chybu
return - text chyby

getErrors () [ErrorHandler]

vrati pole chyb v tvare [$prvok] => text chyby

getInfo ()

eturn info about request

:init ($surl, $sname=NULL, $retryCount=NULL, $conTimeOut=NULL, $timeOut=NULL)

create instance of Webservice class
$surl - service url
$sname - if set, server will be check for matchh that name
$conTimeOut - connection time out
$timeOut - time out of request

isError () [ErrorHandler]

vrati, ci bola vytvorena chyba

multiExec ()

execute multiple request predefined with setRequest

serialize ($bool=true)

setGlobalData ($data)

define parameters in $data, which will be part of all requests

setRequest ($data)

predefine parameters in $data for request which will be executed

__construct ($surl, $sname=NULL, $retryCount=NULL, $conTimeOut=NULL, $timeOut=NULL)

_addError ($rule, $name=NULL, $param=-1) [ErrorHandler]

prida chybu do pola chyb
$rule - prvok zodpovedajuci za chybu
$name - nazov atributu, ktory bude nahradeny za prvok v $param
- nahradzany obsah v texte chyby za $name

_perfExec ($mh, &$active)

ealise and wait for end of curl execution

_serialize ($data)

check if data are serialized and return deserialized $data or NULL


ChameleonFramework © 2012 - 2018