RO
extends Sand
in package
Uses
recordkey
Základní třída pro čtení z AbraFlexi.
Tags
Table of Contents
- $actionsAvailable : array<string|int, mixed>|null
- Pole akcí které podporuje ta která evidence.
- $apiURL : string|null
- URL of object data in AbraFlexi.
- $authSessionId : string|null
- Session ID.
- $autoload : bool
- Load whole record when id is given ?
- $chained : array<string|int, mixed>
- Chained Objects.
- $codes : array<string|int, mixed>|null
- Used codes storage.
- $company : string|null
- $curl : null|resource
- Curl Handle.
- $curlInfo : array<string|int, mixed>|null
- Informace o posledním HTTP requestu.
- $defaultHttpHeaders : array<string|int, mixed>
- $defaultUrlParams : array<string|int, mixed>
- Default additional request url parameters after question mark.
- $evidence : string|null
- Evidence used by object.
- $evidenceInfo : array<string|int, mixed>
- Detaily evidence užité objektem.
- $filter : string|null
- $format : string
- Default communication format.
- $globalVersion : int|null
- Number from @globalVersion.
- $infoDir : string
- Where to get JSON files with evidence structure etc.
- $lastCurlError : string|null
- Informace o poslední HTTP chybě.
- $lastCurlResponse : string
- Raw Content of last curl response.
- $lastInsertedID : int|null
- Last Inserted ID.
- $lastResponseCode : int|null
- HTTP Response code of last request.
- $lastResult : array<string|int, mixed>|null
- Last operation result data or message(s).
- $libVersion : string
- Version of AbraFlexi library.
- $myCreateColumn : string
- Sloupeček obsahující datum vložení záznamu do shopu.
- $myLastModifiedColumn : string
- Sloupeček obsahujici datum poslení modifikace záznamu do shopu.
- $nameColumn : string
- Sloupeček s názvem.
- $nameSpace : string
- Basic namespace for communication with AbraFlexi.
- $nativeTypes : bool
- Convert server data to its native types ? eg. nubmers to integer You can disable it using setUp.
- $offline : bool
- We Connect to server by default.
- $password : string|null
- REST API Password.
- $postFields : string|null
- Body data for next curl POST operation.
- $prefix : string
- Default Line Prefix.
- $protoVersion : string
- Communication protocol version used.
- $refreshToken : string|null
- Token obtained during login procedure.
- $reportRecipient : string
- Send Error500 Report to.
- $responseFormat : string
- requested response format.
- $resultField : string
- Data block in response field.
- $rowCount : int|null
- Number from @rowCount in response.
- $throwException : bool
- Throw Exception in case of AbraFlexi error.
- $timeout : int|null
- Override cURL timeout.
- $url : string|null
- [protocol://]Server[:port].
- $urlParams : array<string|int, mixed>
- The List of known parameters was renamed to $urlParamsKnown.
- $urlParamsKnown : array<string|int, mixed>
- Parmetry pro URL.
- $user : string|null
- REST API Username.
- $action : string|null
- $errors : array<string|int, mixed>
- Array of errors caused by last request.
- $ignoreNotFound : bool
- Save 404 results to log ?
- $responseStats : array<string|int, mixed>|null
- Last Request response stats.
- $columnsInfo : array<string|int, mixed>
- Columns Info for serveral evidencies.
- $jsonDepth : int
- JSON Decode depth limit.
- $reports : array<string|int, mixed>
- List of Error500 reports sent.
- __construct() : mixed
- Class for read only interaction with AbraFlexi.
- __destruct() : mixed
- Disconnect CURL before pass away.
- __sleep() : array<string|int, mixed>
- Only Variables to keep.
- __toString() : string
- Obtain record/object identificator code: or id: Vrací identifikátor objektu code: nebo id:
- __wakeup() : void
- Reconnect After unserialization.
- addDefaultUrlParams() : string
- Add Default Url params to given url if not overrided.
- arrayCleanUP() : array<string|int, mixed>
- Remove all @ items from array.
- code() : string
- Returns code:CODE.
- companyUrlToOptions() : array<string|int, mixed>
- Convert companyUrl provided by CustomButton to options array.
- configToEnv() : void
- Export current/given configutation into Environment.
- connectionReset() : void
- Reset Curl Connection.
- contentTypeToResponseFormat() : string
- Obtain json for application/json.
- curlInit() : bool
- Inicializace CURL.
- dateToFlexiDate() : mixed
- PHP Date object to AbraFlexi date format.
- dateToFlexiDateTime() : mixed
- PHP Date object to AbraFlexi date format.
- disconnect() : void
- Odpojení od AbraFlexi.
- doCurlRequest() : int
- Vykonej HTTP požadavek.
- downloadInFormat() : null|string
- Uloží dokument v daném formátu do složky v systému souborů Save document in given format to directory in filesystem.
- error500Reporter() : void
- Compile and send Report about Error500 to AbraFlexi developers If AbraFlexi is running on localost try also include java backtrace.
- evidenceToClassName() : string
- Gives you AbraFlexi class name for Given Evidence.
- evidenceUrlWithSuffix() : string
- Add suffix to Evidence URL.
- extractUrlParams() : void
- Oddělí z pole podmínek ty jenž patří za ? v URL požadavku.
- fixRecordTypes() : array<string|int, mixed>
- Fix AbraFlexi record field types.
- fixResponseTypes() : array<string|int, mixed>
- Fix field types in AbraFlexi server response.
- flexiDateTimeToDateTime() : DateTime|false
- AbraFlexi dateTime to PHP DateTime conversion.
- flexiDateToDateTime() : DateTime|false
- AbraFlexi date to PHP DateTime conversion.
- flexiIN() : string
- Prepare "IN" subselect.
- flexiUrl() : string
- Generuje fragment url pro filtrování.
- getAbraFlexiURL() : string
- Gives You URL for Current Record in AbraFlexi web interface.
- getActionsInfo() : array<string|int, mixed>
- Obtain actions for current (or given) evidence.
- getAllFromAbraFlexi() : array<string|int, mixed>
- Vrací z AbraFlexi sloupečky podle podmínek.
- getApiURL() : string
- Gives you current ApiURL with given format suffix.
- getColumnInfo() : array<string|int, mixed>
- Gives you properties for (current) evidence column.
- getColumnsFromAbraFlexi() : array<string|int, mixed>
- Vrací z AbraFlexi sloupečky podle podmínek.
- getColumnsInfo() : array<string|int, mixed>
- Gives you evidence structure. You can obtain current online by pre-calling: $this->updateColumnsInfo($evidence, $this->getOnlineColumnsInfo($evidence));
- getCompany() : string
- Obtain company now used Vrací právě používanou firmu.
- getConnectionOptions() : array<string|int, mixed>
- Get Current connection options for use in another object.
- getDataForJSON() : array<string|int, mixed>
- Get Data Fragment specific for current object.
- getErrors() : array<string|int, mixed>
- Last operation errors.
- getEvidence() : string
- Vrací právě používanou evidenci pro komunikaci Obtain current used evidence.
- getEvidenceInfo() : array<string|int, mixed>
- Obtain info for current (or given) evidence.
- getEvidenceName() : array<string|int, mixed>
- Obtain name for current (or given) evidence path.
- getEvidenceURL() : string
- Return basic URL for used Evidence.
- getExternalID() : array<string|int, mixed>|string
- Vrací hodnotu daného externího ID.
- getExternalIDs() : array<string|int, mixed>
- gives you currently loaded extermal IDs.
- getFirstRecordID() : null|string
- Obtain ID of first record in evidence.
- getFlexiData() : array<string|int, mixed>
- Načte data z AbraFlexi.
- getFlexiRow() : array<string|int, mixed>
- Načte řádek dat z AbraFlexi.
- getGlobalVersion() : int
- Obtain actual GlobalVersion Vrací aktuální globální verzi změn.
- getInFormat() : null|string
- Získá dokument v daném formátu Obtain document in given format.
- getJsonizedData() : string
- Převede data do Json formátu pro AbraFlexi.
- getKod() : string
- Vrací kód záznamu.
- getLastOperationType() : string
- Get Last operation type.
- getNextRecordID() : null|int
- Get next record ID.
- getOfflineColumnsInfo() : array<string|int, mixed>
- Obtain structure for current (or given) evidence.
- getOnlineColumnsInfo() : array<string|int, mixed>
- Obtain Current evidence Live structure.
- getPostFields() : string
- Get Content ready to be send as POST body.
- getPrevRecordID() : null|int
- Get next record ID.
- getRecordCode() : string
- Obtain record/object identificator code: Vrací identifikátor objektu code:
- getRecordID() : null|int
- Obtain record/object numeric identificator id: Vrací číselný identifikátor objektu id:
- getRecordIdent() : null|int|string
- Obtain record/object identificator extId: code: or id: Vrací identifikátor objektu extId: code: nebo id:
- getRelationsInfo() : array<string|int, mixed>
- Obtain relations for current (or given) evidence.
- getReportsInfo() : array<string|int, mixed>
- Get Current Evidence reports listing.
- getResponseEvidence() : string
- Vrací název evidence použité v odpovědích z AbraFlexi.
- getResponseFormat() : string
- Obtain content type of last response.
- getVazby() : null|array<string|int, mixed>
- Obtain established relations listing.
- idExists() : bool
- Test if given record ID exists in AbraFlexi.
- ignore404() : bool
- Set or get ignore not found pages flag.
- join() : bool
- Join another Flexi Object.
- loadFromAbraFlexi() : int
- Načte záznam z AbraFlexi a uloží v sobě jeho data Read AbraFlexi record and store it inside od object.
- logBanner() : void
- Add Info about used user, server and libraries.
- login() : bool
- Try to Sign in current user to AbraFlexi and keep authSessionId.
- logout() : array<string|int, mixed>
- End (current's user) session.
- object2array() : array<string|int, mixed>
- Převede rekurzivně Objekt na pole.
- objectToID() : array<string|int, mixed>
- Převede rekurzivně v poli všechny objekty na jejich identifikátory.
- parseError() : int
- Parse error message response.
- parseResponse() : array<string|int, mixed>
- Parse Response array.
- performRequest() : array<string|int, mixed>|bool
- Funkce, která provede I/O operaci a vyhodnotí výsledek.
- processInit() : void
- Zinicializuje objekt dle daných dat. Možné hodnoty:
- rawJsonToArray() : array<string|int, mixed>
- Convert AbraFlexi Response JSON to Array.
- rawResponseToArray() : array<string|int, mixed>
- Parse Raw AbraFlexi response in several formats.
- rawXmlToArray() : array<string|int, mixed>
- Convert AbraFlexi Response XML to Array.
- recordExists() : bool
- Test if given record exists in AbraFlexi.
- reload() : bool
- Reload current record from AbraFlexi.
- requestAuthSessionID() : string
- Request authSessionId from current server.
- saveDebugFiles() : void
- Save RAW Curl Request & Response to files in Temp directory.
- saveResponseToFile() : void
- Save current object to file.
- sendByMail() : bool
- Send Document by mail.
- setAction() : bool
- Nastaví druh prováděné akce.
- setCompany() : void
- Set used company.
- setDataValue() : bool
- Set Data Field value.
- setEvidence() : bool
- Nastaví Evidenci pro Komunikaci.
- setFilter() : string
- Set Filter code for requests.
- setFormat() : bool
- Set communication format.
- setMyKey() : bool
- Set Record Key.
- setObjectName() : string
- Set internal Object name.
- setPostFields() : void
- Připraví data pro odeslání do AbraFlexi.
- setPrefix() : void
- Set URL prefix.
- setUp() : bool
- SetUp Object to be ready for work.
- stripBody() : RO
- Strip all non-identifier data.
- success() : bool
- Return last response success status.
- takeData() : int
- Take data for object. separate external IDs.
- uncode() : string
- Returns CODE without code: prefix.
- unifyResponseFormat() : array<string|int, mixed>
- Return the same response format for one and multiplete results.
- updateApiURL() : void
- Update $this->apiURL.
- updateColumnsInfo() : void
- Update evidence info from array or online from properties.json or offline.
- urlEncode() : string
- convert unicode to entities for use with AbraFlexi queries.
- urlizeId() : string
- Prepare record ID to use in URL.
Properties
$actionsAvailable
Pole akcí které podporuje ta která evidence.
public
array<string|int, mixed>|null
$actionsAvailable
= null
Tags
$apiURL
URL of object data in AbraFlexi.
public
string|null
$apiURL
= null
url
$authSessionId
Session ID.
public
string|null
$authSessionId
= null
$autoload
Load whole record when id is given ?
public
bool
$autoload
= true
$chained
Chained Objects.
public
array<string|int, mixed>
$chained
= []
$codes
Used codes storage.
public
array<string|int, mixed>|null
$codes
= null
$company
public
string|null
$company
= null
Tags
$curl
Curl Handle.
public
null|resource
$curl
$curlInfo
Informace o posledním HTTP requestu.
public
array<string|int, mixed>|null
$curlInfo
$defaultHttpHeaders
public
array<string|int, mixed>
$defaultHttpHeaders
= []
Pole HTTP hlaviček odesílaných s každým požadavkem
$defaultUrlParams
Default additional request url parameters after question mark.
public
array<string|int, mixed>
$defaultUrlParams
= []
Tags
$evidence
Evidence used by object.
public
string|null
$evidence
= null
Tags
$evidenceInfo
Detaily evidence užité objektem.
public
array<string|int, mixed>
$evidenceInfo
= []
$filter
public
string|null
$filter
= null
filter query
Tags
$format
Default communication format.
public
string
$format
= 'json'
json|xml|...
Tags
$globalVersion
Number from @globalVersion.
public
int|null
$globalVersion
= null
$infoDir
Where to get JSON files with evidence structure etc.
public
static string
$infoDir
= __DIR__ . '/../../static'
$lastCurlError
Informace o poslední HTTP chybě.
public
string|null
$lastCurlError
= null
$lastCurlResponse
Raw Content of last curl response.
public
string
$lastCurlResponse
$lastInsertedID
Last Inserted ID.
public
int|null
$lastInsertedID
= null
$lastResponseCode
HTTP Response code of last request.
public
int|null
$lastResponseCode
= null
$lastResult
Last operation result data or message(s).
public
array<string|int, mixed>|null
$lastResult
= null
$libVersion
Version of AbraFlexi library.
public
static string
$libVersion
= '2.20'
$myCreateColumn
Sloupeček obsahující datum vložení záznamu do shopu.
public
string
$myCreateColumn
= 'false'
$myLastModifiedColumn
Sloupeček obsahujici datum poslení modifikace záznamu do shopu.
public
string
$myLastModifiedColumn
= 'lastUpdate'
$nameColumn
Sloupeček s názvem.
public
string
$nameColumn
= 'nazev'
$nameSpace
Basic namespace for communication with AbraFlexi.
public
string
$nameSpace
= 'winstrom'
Jmený prostor datového bloku odpovědi
$nativeTypes
Convert server data to its native types ? eg. nubmers to integer You can disable it using setUp.
public
bool
$nativeTypes
= true
$offline
We Connect to server by default.
public
bool
$offline
= false
$password
REST API Password.
public
string|null
$password
= null
$postFields
Body data for next curl POST operation.
public
string|null
$postFields
= null
$prefix
Default Line Prefix.
public
string
$prefix
= '/c/'
$protoVersion
Communication protocol version used.
public
string
$protoVersion
= '1.0'
Verze použitého API
$refreshToken
Token obtained during login procedure.
public
string|null
$refreshToken
= null
$reportRecipient
Send Error500 Report to.
public
string
$reportRecipient
= 'podpora@abraflexi.eu'
email address
$responseFormat
requested response format.
public
string
$responseFormat
= 'json'
json|xml|...
Tags
$resultField
Data block in response field.
public
string
$resultField
= 'results'
$rowCount
Number from @rowCount in response.
public
int|null
$rowCount
= null
$throwException
Throw Exception in case of AbraFlexi error.
public
bool
$throwException
= true
$timeout
Override cURL timeout.
public
int|null
$timeout
= null
seconds
$url
[protocol://]Server[:port].
public
string|null
$url
= null
$urlParams
The List of known parameters was renamed to $urlParamsKnown.
public
array<string|int, mixed>
$urlParams
Tags
$urlParamsKnown
Parmetry pro URL.
public
array<string|int, mixed>
$urlParamsKnown
= [
'add-global-version' => ['type' => 'boolean', 'description' => 'The response will contain the global version number of the current export'],
'add-row-count' => ['type' => 'boolean', 'description' => 'Adding Total Records to Output (Pagination)'],
'as-gui' => ['type' => 'boolean', 'description' => 'Turns on functions that complement the GUI processing outputs'],
'auth' => ['type' => 'string', 'description' => 'http: Forces login using HTTP authentication, for example, to change the default WUI login method. html: Force HTML form authentication. This can be useful to suppress automatic SSO authentication.'],
'authSessionId' => ['type' => 'string', 'description' => 'Authentification Session ID'],
'code-as-id' => ['type' => 'boolean', 'description' => 'If an object has unique code, it is also exported (except for the <code> element) as <id> code: ... </id>'],
'code-in-response' => ['type' => 'boolean', 'description' => 'The response will contain not only ID and URL for each object, but also code.'],
'delimeter' => ['type' => 'string', 'description' => 'Specifies the input / output file separator in CSV format.', 'example' => ';'],
'detail' => ['type' => 'string', 'description' => 'Definition of the level of detail'],
// See: https://www.abraflexi.eu/api/dokumentace/ref/detail-levels
'dir' => ['type' => 'string', 'description' => 'Sorting direction.', 'example' => 'desc'],
'dry-run' => ['type' => 'boolean', 'description' => 'Test run (dry-run)'],
// See: https://www.abraflexi.eu/api/dokumentace/ref/dry-run/
'encoding' => ['type' => 'string', 'description' => 'Specifies the encoding of the input / output file in CSV format.'],
'export-settings' => ['type' => 'boolean', 'description' => 'Export one extra entry with current settings at the beginning'],
'fail-on-warning' => ['type' => 'boolean', 'description' => 'If a warning occurs, do not save a record (Data Validation)'],
'filter' => ['type' => 'string', 'description' => 'filter results by this param'],
'format' => ['type' => 'string', 'description' => 'One of the compiled XSL transforms will be applied to the output XML.'],
'idUcetniObdobi' => ['type' => 'string', 'description' => ''],
// See: https://www.abraflexi.eu/api/dokumentace/ref/stavy-uctu/
'includes' => ['type' => 'string', 'description' => 'Include related detail level object ', 'example' => 'faktura-vydana/stredisko'],
'inDesktopApp' => ['type' => 'boolean', 'description' => 'Hide menu and navigation in html format'],
// Note: Undocumented function (html only)
'limit' => ['type' => 'integer', 'description' => 'number of requested results'],
'mode' => ['type' => 'string', 'description' => 'Support for RubyOnRails', 'example' => 'ruby'],
'no-ext-ids' => ['type' => 'boolean', 'description' => 'The answer will not contain external identifiers (performance optimization)'],
'no-http-errors' => ['type' => 'boolean', 'description' => 'If a 4xx error occurs while processing a request, the server sends 200 OK anyway'],
'no-ids' => ['type' => 'boolean', 'description' => 'The response will not contain any primary identifiers (performance optimization). It only affects the main records.'],
'only-ext-ids' => ['type' => 'boolean', 'description' => 'The primary key will not be exported, the <id> elements will only contain the external ID. Similar no-ids, but also affects subevidencies.'],
'order' => ['type' => 'string', 'description' => 'Sorting records', 'example' => 'nazev@A'],
'relations' => ['type' => 'string', 'description' => 'Adding session data (see detail levels) A session overview can be obtained for each record (/ relations).'],
'report-lang' => ['type' => 'string', 'description' => 'The language in which to print the output when exporting to PDF', 'example' => 'en'],
'report-name' => ['type' => 'string', 'description' => 'The name of the printout when exporting to PDF', 'example' => 'invoice'],
'report-sign' => ['type' => 'string', 'description' => 'Whether the PDF should be exported electronically signed'],
'skupina-stitku' => ['type' => 'string', 'description' => 'Enables grouping of labels when exporting by group (multiple labels)'],
'sort' => ['type' => 'string', 'description' => 'Sorting records for ExtJS'],
'start' => ['type' => 'integer', 'description' => 'Pagination'],
'stitky-as-ids' => ['type' => 'boolean', 'description' => 'Labels will be exported and imported not as a code list but as a list of numeric IDs'],
'use-ext-id' => ['type' => 'boolean', 'description' => 'If the object contains an external ESHOP or MY ID, use it as a bind.'],
'use-internal-id' => ['type' => 'boolean', 'description' => 'In addition to the ref and showAs for objects, it also supplies an internalId attribute that contains the internal record ID'],
'xpath' => ['type' => 'string', 'description' => 'Apply XPATH to result', 'example' => '//winstrom/adresar/email/text()'],
]
Tags
$user
REST API Username.
public
string|null
$user
= null
$action
protected
string|null
$action
= null
Tags
$errors
Array of errors caused by last request.
protected
array<string|int, mixed>
$errors
= []
$ignoreNotFound
Save 404 results to log ?
protected
bool
$ignoreNotFound
= false
$responseStats
Last Request response stats.
protected
array<string|int, mixed>|null
$responseStats
= null
$columnsInfo
Columns Info for serveral evidencies.
private
array<string|int, mixed>
$columnsInfo
= []
$jsonDepth
JSON Decode depth limit.
private
int
$jsonDepth
= 20
$reports
List of Error500 reports sent.
private
array<string|int, mixed>
$reports
= []
Methods
__construct()
Class for read only interaction with AbraFlexi.
public
__construct([mixed $init = null ][, array<string, int|string|true> $options = [] ]) : mixed
Parameters
- $init : mixed = null
-
default record id or initial data. See processInit()
- $options : array<string, int|string|true> = []
-
Connection settings and other options override
Return values
mixed —__destruct()
Disconnect CURL before pass away.
public
__destruct() : mixed
Return values
mixed —__sleep()
Only Variables to keep.
public
__sleep() : array<string|int, mixed>
Return values
array<string|int, mixed> —__toString()
Obtain record/object identificator code: or id: Vrací identifikátor objektu code: nebo id:
public
__toString() : string
Tags
Return values
string —indentifikátor záznamu reprezentovaného objektem
__wakeup()
Reconnect After unserialization.
public
__wakeup() : void
Return values
void —addDefaultUrlParams()
Add Default Url params to given url if not overrided.
public
addDefaultUrlParams(string $urlRaw) : string
Parameters
- $urlRaw : string
Return values
string —url with default params added
arrayCleanUP()
Remove all @ items from array.
public
static arrayCleanUP(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
-
original data
Return values
array<string|int, mixed> —data without @ columns
code()
Returns code:CODE.
public
static code(string $code) : string
Parameters
- $code : string
Tags
Return values
string —companyUrlToOptions()
Convert companyUrl provided by CustomButton to options array.
public
static companyUrlToOptions(string $companyUrl) : array<string|int, mixed>
Parameters
- $companyUrl : string
Tags
Return values
array<string|int, mixed> —Options
configToEnv()
Export current/given configutation into Environment.
public
configToEnv([array<string|int, mixed> $opts = [] ]) : void
Parameters
- $opts : array<string|int, mixed> = []
Return values
void —connectionReset()
Reset Curl Connection.
public
connectionReset() : void
Return values
void —contentTypeToResponseFormat()
Obtain json for application/json.
public
contentTypeToResponseFormat(string $contentType[, string $url = '' ]) : string
Parameters
- $contentType : string
- $url : string = ''
Return values
string —curlInit()
Inicializace CURL.
public
curlInit() : bool
Return values
bool —Online Status
dateToFlexiDate()
PHP Date object to AbraFlexi date format.
public
static dateToFlexiDate(DateTime $date) : mixed
Parameters
- $date : DateTime
Tags
Return values
mixed —dateToFlexiDateTime()
PHP Date object to AbraFlexi date format.
public
static dateToFlexiDateTime(DateTime $dateTime) : mixed
Parameters
- $dateTime : DateTime
Tags
Return values
mixed —disconnect()
Odpojení od AbraFlexi.
public
disconnect() : void
Return values
void —doCurlRequest()
Vykonej HTTP požadavek.
public
doCurlRequest(string $url, string $method[, string $format = null ]) : int
Parameters
- $url : string
-
URL požadavku
- $method : string
-
HTTP Method GET|POST|PUT|OPTIONS|DELETE
- $format : string = null
-
požadovaný formát komunikace
Tags
Return values
int —HTTP Response CODE
downloadInFormat()
Uloží dokument v daném formátu do složky v systému souborů Save document in given format to directory in filesystem.
public
downloadInFormat(string $format[, string $destDir = './' ][, string $reportName = null ][, string $lang = null ][, bool $sign = false ]) : null|string
Parameters
- $format : string
-
pdf/csv/xml/json/ ...
- $destDir : string = './'
-
where to put file (prefix)
- $reportName : string = null
-
Template used to generate PDF
- $lang : string = null
-
Requested Language
- $sign : bool = false
-
download digital signed
Return values
null|string —filename downloaded or none
error500Reporter()
Compile and send Report about Error500 to AbraFlexi developers If AbraFlexi is running on localost try also include java backtrace.
public
error500Reporter(array<string|int, mixed> $errorResponse) : void
Parameters
- $errorResponse : array<string|int, mixed>
-
result of parseError();
Return values
void —evidenceToClassName()
Gives you AbraFlexi class name for Given Evidence.
public
static evidenceToClassName(string $evidence) : string
Parameters
- $evidence : string
Tags
Return values
string —Class name
evidenceUrlWithSuffix()
Add suffix to Evidence URL.
public
evidenceUrlWithSuffix(string $urlSuffix) : string
Parameters
- $urlSuffix : string
Return values
string —extractUrlParams()
Oddělí z pole podmínek ty jenž patří za ? v URL požadavku.
public
extractUrlParams(array<string|int, mixed> &$conditions, array<string|int, mixed> &$urlParams) : void
Parameters
- $conditions : array<string|int, mixed>
-
pole podmínek - rendrují se do ()
- $urlParams : array<string|int, mixed>
-
pole parametrů - rendrují za ?
Tags
Return values
void —fixRecordTypes()
Fix AbraFlexi record field types.
public
fixRecordTypes(array<string|int, mixed> $record[, string $evidence = null ]) : array<string|int, mixed>
Parameters
- $record : array<string|int, mixed>
- $evidence : string = null
-
force other than current
Tags
Return values
array<string|int, mixed> —with items typed
fixResponseTypes()
Fix field types in AbraFlexi server response.
public
fixResponseTypes(array<string|int, mixed> $response) : array<string|int, mixed>
Parameters
- $response : array<string|int, mixed>
-
raw response
Return values
array<string|int, mixed> —types resolved
flexiDateTimeToDateTime()
AbraFlexi dateTime to PHP DateTime conversion.
public
static flexiDateTimeToDateTime(string $flexidatetime) : DateTime|false
Parameters
- $flexidatetime : string
-
2017-09-26T10:00:53.755+02:00 or older 2017-05-19T00:00:00+02:00
Tags
Return values
DateTime|false —flexiDateToDateTime()
AbraFlexi date to PHP DateTime conversion.
public
static flexiDateToDateTime(string $flexidate) : DateTime|false
Parameters
- $flexidate : string
-
2017-05-26 or 2017-05-26Z or 2017-05-26+02:00
Tags
Return values
DateTime|false —flexiIN()
Prepare "IN" subselect.
public
static flexiIN(array<string|int, mixed> $items, string $key) : string
Parameters
- $items : array<string|int, mixed>
- $key : string
Tags
Return values
string —"in" fragment
flexiUrl()
Generuje fragment url pro filtrování.
public
static flexiUrl(array<string|int, mixed> $data[, string $joiner = 'and' ][, string $defop = 'eq' ]) : string
Parameters
- $data : array<string|int, mixed>
-
key=>values; value can bee class DatePeriod, DateTime or Array
- $joiner : string = 'and'
-
default and/or
- $defop : string = 'eq'
-
default operator
Tags
Return values
string —getAbraFlexiURL()
Gives You URL for Current Record in AbraFlexi web interface.
public
getAbraFlexiURL() : string
Return values
string —url
getActionsInfo()
Obtain actions for current (or given) evidence.
public
getActionsInfo([string $evidence = null ]) : array<string|int, mixed>
Parameters
- $evidence : string = null
Return values
array<string|int, mixed> —Evidence structure
getAllFromAbraFlexi()
Vrací z AbraFlexi sloupečky podle podmínek.
public
getAllFromAbraFlexi([array<string|int, mixed>|int|string $conditions = null ][, string $indexBy = null ]) : array<string|int, mixed>
Parameters
- $conditions : array<string|int, mixed>|int|string = null
-
pole podmínek nebo ID záznamu
- $indexBy : string = null
-
klice vysledku naplnit hodnotou ze sloupečku
Return values
array<string|int, mixed> —getApiURL()
Gives you current ApiURL with given format suffix.
public
getApiURL([string $format = null ]) : string
Parameters
- $format : string = null
-
json|html|xml|...
Return values
string —API URL for current record or object/evidence
getColumnInfo()
Gives you properties for (current) evidence column.
public
getColumnInfo(string $column[, string $evidence = null ]) : array<string|int, mixed>
Parameters
- $column : string
-
name of column
- $evidence : string = null
-
evidence name if different
Return values
array<string|int, mixed> —column properties or null if column not exits
getColumnsFromAbraFlexi()
Vrací z AbraFlexi sloupečky podle podmínek.
public
getColumnsFromAbraFlexi(string|array<string|int, string> $columnsList[, array<string|int, mixed> $conditions = [] ][, string $indexBy = null ]) : array<string|int, mixed>
Parameters
- $columnsList : string|array<string|int, string>
-
seznam položek nebo úrověň detailu: id|summary|full
- $conditions : array<string|int, mixed> = []
-
pole podmínek nebo ID záznamu
- $indexBy : string = null
-
Sloupeček podle kterého indexovat záznamy
Return values
array<string|int, mixed> —getColumnsInfo()
Gives you evidence structure. You can obtain current online by pre-calling: $this->updateColumnsInfo($evidence, $this->getOnlineColumnsInfo($evidence));
public
getColumnsInfo([string $evidence = null ]) : array<string|int, mixed>
Parameters
- $evidence : string = null
Return values
array<string|int, mixed> —getCompany()
Obtain company now used Vrací právě používanou firmu.
public
getCompany() : string
Return values
string —getConnectionOptions()
Get Current connection options for use in another object.
public
getConnectionOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —usable as second constructor parameter
getDataForJSON()
Get Data Fragment specific for current object.
public
getDataForJSON([array<string|int, mixed> $data = null ]) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed> = null
Return values
array<string|int, mixed> —getErrors()
Last operation errors.
public
getErrors() : array<string|int, mixed>
Return values
array<string|int, mixed> —AbraFlexi error meassages
getEvidence()
Vrací právě používanou evidenci pro komunikaci Obtain current used evidence.
public
getEvidence() : string
Return values
string —getEvidenceInfo()
Obtain info for current (or given) evidence.
public
getEvidenceInfo([string $evidence = '' ]) : array<string|int, mixed>
Parameters
- $evidence : string = ''
Return values
array<string|int, mixed> —Evidence info
getEvidenceName()
Obtain name for current (or given) evidence path.
public
getEvidenceName([string $evidence = null ]) : array<string|int, mixed>
Parameters
- $evidence : string = null
-
Evidence Path
Return values
array<string|int, mixed> —Evidence info
getEvidenceURL()
Return basic URL for used Evidence.
public
getEvidenceURL() : string
Tags
Return values
string —Evidence URL
getExternalID()
Vrací hodnotu daného externího ID.
public
getExternalID([string $want = null ]) : array<string|int, mixed>|string
Parameters
- $want : string = null
-
Namespace Selector. If empty,you obtain the first one.
Return values
array<string|int, mixed>|string —one id or array if multiplete
getExternalIDs()
gives you currently loaded extermal IDs.
public
getExternalIDs() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFirstRecordID()
Obtain ID of first record in evidence.
public
getFirstRecordID() : null|string
Return values
null|string —id or null if no records
getFlexiData()
Načte data z AbraFlexi.
public
getFlexiData([string $suffix = '' ][, array<string|int, mixed>|string $conditions = null ]) : array<string|int, mixed>
Parameters
- $suffix : string = ''
-
dotaz
- $conditions : array<string|int, mixed>|string = null
-
Custom filters or modifiers
Return values
array<string|int, mixed> —Data obtained
getFlexiRow()
Načte řádek dat z AbraFlexi.
public
getFlexiRow(int $recordID) : array<string|int, mixed>
Parameters
- $recordID : int
-
id požadovaného záznamu
Return values
array<string|int, mixed> —getGlobalVersion()
Obtain actual GlobalVersion Vrací aktuální globální verzi změn.
public
getGlobalVersion() : int
Tags
Return values
int —getInFormat()
Získá dokument v daném formátu Obtain document in given format.
public
getInFormat(string $format[, string $reportName = null ][, string $lang = null ][, bool $sign = false ]) : null|string
Parameters
- $format : string
-
pdf/csv/xml/json/ ...
- $reportName : string = null
-
Template used to generate PDF
- $lang : string = null
-
cs|sk|en|de Template language used to generate PDF
- $sign : bool = false
-
sign resulting PDF by certificate ?
Tags
Return values
null|string —filename downloaded or none
getJsonizedData()
Převede data do Json formátu pro AbraFlexi.
public
getJsonizedData([array<string|int, mixed> $data = null ], int $options) : string
Convert data to AbraFlexi like Json format.
Parameters
- $data : array<string|int, mixed> = null
-
object data
- $options : int
-
json_encode options like JSON_PRETTY_PRINT etc
Tags
Return values
string —getKod()
Vrací kód záznamu.
public
getKod([mixed $data = null ][, mixed $unique = true ]) : string
Obtain record CODE.
Parameters
- $data : mixed = null
- $unique : mixed = true
Tags
Return values
string —getLastOperationType()
Get Last operation type.
public
getLastOperationType() : string
Return values
string —create|read|update|delete or update,insert for some inserted and updated in one transaction
getNextRecordID()
Get next record ID.
public
getNextRecordID([array<string|int, mixed> $conditions = [] ]) : null|int
Parameters
- $conditions : array<string|int, mixed> = []
-
optional
Return values
null|int —getOfflineColumnsInfo()
Obtain structure for current (or given) evidence.
public
getOfflineColumnsInfo([string $evidence = null ]) : array<string|int, mixed>
Parameters
- $evidence : string = null
Return values
array<string|int, mixed> —Evidence structure
getOnlineColumnsInfo()
Obtain Current evidence Live structure.
public
getOnlineColumnsInfo([string $evidence = null ]) : array<string|int, mixed>
Parameters
- $evidence : string = null
Return values
array<string|int, mixed> —structure
getPostFields()
Get Content ready to be send as POST body.
public
getPostFields() : string
Return values
string —getPrevRecordID()
Get next record ID.
public
getPrevRecordID([array<string|int, mixed> $conditions = [] ]) : null|int
Parameters
- $conditions : array<string|int, mixed> = []
-
optional
Return values
null|int —getRecordCode()
Obtain record/object identificator code: Vrací identifikátor objektu code:
public
getRecordCode() : string
Tags
Return values
string —record code identifier
getRecordID()
Obtain record/object numeric identificator id: Vrací číselný identifikátor objektu id:
public
getRecordID() : null|int
Tags
Return values
null|int —indentifikátor záznamu reprezentovaného objektem
getRecordIdent()
Obtain record/object identificator extId: code: or id: Vrací identifikátor objektu extId: code: nebo id:
public
getRecordIdent() : null|int|string
Tags
Return values
null|int|string —record code identifier
getRelationsInfo()
Obtain relations for current (or given) evidence.
public
getRelationsInfo([string $evidence = null ]) : array<string|int, mixed>
Parameters
- $evidence : string = null
Return values
array<string|int, mixed> —Evidence structure
getReportsInfo()
Get Current Evidence reports listing.
public
getReportsInfo() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getResponseEvidence()
Vrací název evidence použité v odpovědích z AbraFlexi.
public
getResponseEvidence() : string
Return values
string —getResponseFormat()
Obtain content type of last response.
public
getResponseFormat() : string
Return values
string —getVazby()
Obtain established relations listing.
public
getVazby([null|mixed $id = null ]) : null|array<string|int, mixed>
Parameters
- $id : null|mixed = null
Return values
null|array<string|int, mixed> —or Relations
idExists()
Test if given record ID exists in AbraFlexi.
public
idExists([mixed $identifer = null ]) : bool
Parameters
- $identifer : mixed = null
-
presence state
Tags
Return values
bool —ignore404()
Set or get ignore not found pages flag.
public
ignore404([bool $ignore = null ]) : bool
Parameters
- $ignore : bool = null
-
set flag to
Return values
bool —get flag state
join()
Join another Flexi Object.
public
join(RO &$object) : bool
Parameters
- $object : RO
Return values
bool —adding to stack success
loadFromAbraFlexi()
Načte záznam z AbraFlexi a uloží v sobě jeho data Read AbraFlexi record and store it inside od object.
public
loadFromAbraFlexi([array<string|int, mixed>|int|string $id = null ]) : int
Parameters
- $id : array<string|int, mixed>|int|string = null
-
ID or conditions
Return values
int —počet načtených položek
logBanner()
Add Info about used user, server and libraries.
public
logBanner([string $prefix = null ][, string $suffix = null ]) : void
Parameters
- $prefix : string = null
-
banner prefix text
- $suffix : string = null
-
banner suffix text
Return values
void —login()
Try to Sign in current user to AbraFlexi and keep authSessionId.
public
login() : bool
Return values
bool —sign in success
logout()
End (current's user) session.
public
logout([string $username = null ]) : array<string|int, mixed>
Parameters
- $username : string = null
-
force username to sign off
Tags
Return values
array<string|int, mixed> —server response
object2array()
Převede rekurzivně Objekt na pole.
public
static object2array(array<string|int, mixed>|object $object) : array<string|int, mixed>
Parameters
- $object : array<string|int, mixed>|object
Tags
Return values
array<string|int, mixed> —objectToID()
Převede rekurzivně v poli všechny objekty na jejich identifikátory.
public
static objectToID(array<string|int, mixed>|object $object) : array<string|int, mixed>
Parameters
- $object : array<string|int, mixed>|object
Tags
Return values
array<string|int, mixed> —parseError()
Parse error message response.
public
parseError(array<string|int, mixed> $responseDecoded) : int
Parameters
- $responseDecoded : array<string|int, mixed>
Return values
int —number of errors processed
parseResponse()
Parse Response array.
public
parseResponse(array<string|int, mixed>|string $responseDecoded, int $responseCode) : array<string|int, mixed>
Parameters
- $responseDecoded : array<string|int, mixed>|string
- $responseCode : int
-
Request Response Code
Return values
array<string|int, mixed> —main data part of response
performRequest()
Funkce, která provede I/O operaci a vyhodnotí výsledek.
public
performRequest([string $urlSuffix = '' ][, string $method = 'GET' ][, string $format = null ]) : array<string|int, mixed>|bool
Parameters
- $urlSuffix : string = ''
-
část URL za identifikátorem firmy
- $method : string = 'GET'
-
HTTP/REST metoda
- $format : string = null
-
Requested format
Return values
array<string|int, mixed>|bool —Výsledek operace
processInit()
Zinicializuje objekt dle daných dat. Možné hodnoty:
public
processInit(mixed $init) : void
- 234 - interní číslo záznamu k načtení
- code:LOPATA - kód záznamu
- BAGR - kód záznamu k načtení
- ['id'=>24,'nazev'=>'hoblík'] - pole hodnot k předvyplnění
- 743.json?relations=adresa,vazby - část url s parametry k načtení
Parameters
- $init : mixed
-
číslo/"(code:)kód"/(část)URI záznamu k načtení | pole hodnot k předvyplnění
Return values
void —rawJsonToArray()
Convert AbraFlexi Response JSON to Array.
public
rawJsonToArray(string $rawJson) : array<string|int, mixed>
Parameters
- $rawJson : string
Return values
array<string|int, mixed> —rawResponseToArray()
Parse Raw AbraFlexi response in several formats.
public
rawResponseToArray(string $responseRaw, string $format) : array<string|int, mixed>
Parameters
- $responseRaw : string
-
raw response body
- $format : string
-
Raw Response format json|xml|etc
Return values
array<string|int, mixed> —rawXmlToArray()
Convert AbraFlexi Response XML to Array.
public
rawXmlToArray(string $rawXML) : array<string|int, mixed>
Parameters
- $rawXML : string
Return values
array<string|int, mixed> —recordExists()
Test if given record exists in AbraFlexi.
public
recordExists([array<string|int, mixed>|int|string $data = [] ]) : bool
Parameters
- $data : array<string|int, mixed>|int|string = []
-
ext:id:23|code:ITEM|['id'=>23]|23
Return values
bool —Record presence status
reload()
Reload current record from AbraFlexi.
public
reload() : bool
Return values
bool —requestAuthSessionID()
Request authSessionId from current server.
public
requestAuthSessionID(string $username, string $password[, string $otp = null ]) : string
Parameters
- $username : string
- $password : string
- $otp : string = null
-
optional onetime password
Tags
Return values
string —authUserId or null in case of problems
saveDebugFiles()
Save RAW Curl Request & Response to files in Temp directory.
public
saveDebugFiles() : void
Return values
void —saveResponseToFile()
Save current object to file.
public
saveResponseToFile(string $destfile) : void
Parameters
- $destfile : string
-
path to file
Return values
void —sendByMail()
Send Document by mail.
public
sendByMail(string $to, string $subject, string $body[, null|mixed $cc = null ]) : bool
Parameters
- $to : string
-
Email ecipient
- $subject : string
-
Email Subject
- $body : string
-
Email Text
- $cc : null|mixed = null
Tags
Return values
bool —mail sent status
setAction()
Nastaví druh prováděné akce.
public
setAction(string $action) : bool
Parameters
- $action : string
Tags
Return values
bool —setCompany()
Set used company.
public
setCompany(string $company) : void
Nastaví Firmu.
Parameters
- $company : string
Return values
void —setDataValue()
Set Data Field value.
public
setDataValue(string $columnName, mixed $value) : bool
Parameters
- $columnName : string
-
field name
- $value : mixed
-
field data value
Return values
bool —Success
setEvidence()
Nastaví Evidenci pro Komunikaci.
public
setEvidence(string $evidence) : bool
Set evidence for communication.
Parameters
- $evidence : string
-
evidence pathName to use
Return values
bool —evidence switching status
setFilter()
Set Filter code for requests.
public
setFilter(array<string|int, mixed>|string $filter) : string
Parameters
- $filter : array<string|int, mixed>|string
-
filter formula or ['key'=>'value']
Tags
Return values
string —Filter code
setFormat()
Set communication format.
public
setFormat(string $format) : bool
One of html|xml|json|csv|dbf|xls|isdoc|isdocx|edi|pdf|pdf|vcf|ical.
Parameters
- $format : string
Return values
bool —format is availble
setMyKey()
Set Record Key.
public
setMyKey(int|string $myKeyValue) : bool
Parameters
- $myKeyValue : int|string
Return values
bool —setObjectName()
Set internal Object name.
public
setObjectName([string $objectName = null ]) : string
Parameters
- $objectName : string = null
Return values
string —Jméno objektu
setPostFields()
Připraví data pro odeslání do AbraFlexi.
public
setPostFields(string $data) : void
Parameters
- $data : string
Return values
void —setPrefix()
Set URL prefix.
public
setPrefix(string $prefix) : void
Parameters
- $prefix : string
Return values
void —setUp()
SetUp Object to be ready for work.
public
setUp([array<string|int, mixed> $options = [] ]) : bool
Parameters
- $options : array<string|int, mixed> = []
-
Object Options ( user,password,authSessionId company,url,evidence, prefix,defaultUrlParams,debug,autoload detail,offline,filter,ignore404,nativeTypes timeout,companyUrl,ver,throwException
Return values
bool —stripBody()
Strip all non-identifier data.
public
stripBody([array<string|int, mixed> $keep = [] ]) : RO
Parameters
- $keep : array<string|int, mixed> = []
-
extra columns to be preserved
Return values
RO —Current object state
success()
Return last response success status.
public
success() : bool
Return values
bool —takeData()
Take data for object. separate external IDs.
public
takeData(array<string, mixed> $data) : int
Parameters
- $data : array<string, mixed>
-
Data to keep
Return values
int —number of records taken
uncode()
Returns CODE without code: prefix.
public
static uncode(string $code) : string
Parameters
- $code : string
Tags
Return values
string —unifyResponseFormat()
Return the same response format for one and multiplete results.
public
unifyResponseFormat(array<string|int, mixed> $responseBody) : array<string|int, mixed>
Parameters
- $responseBody : array<string|int, mixed>
Return values
array<string|int, mixed> —updateApiURL()
Update $this->apiURL.
public
updateApiURL() : void
Return values
void —updateColumnsInfo()
Update evidence info from array or online from properties.json or offline.
public
updateColumnsInfo([array<string|int, mixed> $columnsInfo = null ][, string $evidence = null ]) : void
Parameters
- $columnsInfo : array<string|int, mixed> = null
- $evidence : string = null
Return values
void —urlEncode()
convert unicode to entities for use with AbraFlexi queries.
public
static urlEncode(string $urlRaw) : string
Parameters
- $urlRaw : string
Tags
Return values
string —urlizeId()
Prepare record ID to use in URL.
public
static urlizeId(mixed $id) : string
Parameters
- $id : mixed
Tags
Return values
string —id ready for use in URL