Documentation

Stitek extends RW

Štítek

Tags
link

Vlastnosti evidence

Table of Contents

$actionsAvailable  : array
Pole akcí které podporuje ta která evidence
$apiURL  : string
URL of object data in AbraFlexi
$atomic  : bool
Transaction processing mode
$authSessionId  : string
Session ID
$chained  : array
Chained Objects
$codes  : array
Used codes storage.
$company  : string
$curl  : resource
Curl Handle.
$curlInfo  : mixed
Informace o posledním HTTP requestu.
$DateFormat  : string
Formating string for \DateTime::format() for date columns
$DateTimeFormat  : string
Formating string for \DateTime::format() for datetime columns
$defaultHttpHeaders  : array
$defaultUrlParams  : array
Default additional request url parameters after question mark
$evidence  : string
Evidence užitá objektem.
$evidenceInfo  : array
Detaily evidence užité objektem
$fbKeyColumn  : string
Klíčový idendifikátor záznamu.
$filter  : string
$format  : string
Default communication format.
$globalVersion  : int
Number from @globalVersion
$infoDir  : string
Where to get JSON files with evidence stricture etc.
$init  : string
Identifikační řetězec.
$lastCurlError  : string
Informace o poslední HTTP chybě.
$lastCurlResponse  : string
Raw Content of last curl response
$lastInsertedID  : int
Last Inserted ID.
$lastResponseCode  : int
HTTP Response code of last request
$lastResult  : array
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
Slopecek 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
REST API Password
$postFields  : string
Body data for next curl POST operation
$prefix  : string
Default Line Prefix.
$protoVersion  : string
Communication protocol version used.
$refreshToken  : string
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
Number from @rowCount in response
$throwException  : bool
Throw Exception in case of AbraFlexi error
$timeout  : int
Override cURL timeout
$url  : string
[protocol://]Server[:port]
$urlParams  : array
Parmetry pro URL
$user  : string
REST API Username
$vsbToEvidencePath  : array
Evidence Path for vsb supported by label
$action  : string
$errors  : array
Array of errors caused by last request
$ignoreNotFound  : bool
Save 404 results to log ?
$responseStats  : array
Last Request response stats
$columnsInfo  : array
Columns Info for serveral evidencies
$reports  : array
List of Error500 reports sent
$sourceId  : int
Record Copy helper
__construct()  : mixed
Class for read only interaction with AbraFlexi.
__destruct()  : mixed
Disconnect CURL befere pass away
__toString()  : string
Obtain record/object identificator code: or id: Vrací identifikátor objektu code: nebo id:
__wakeup()  : mixed
Reconnect After unserialization
addArrayToBranch()  : bool
Add Data to evidence Branch Přidá data do větve
addDefaultUrlParams()  : mixed
addExternalID()  : array
Add External ID to Current Record
addObjectToBranch()  : mixed
Vloží do větve data z objektu
addStatusMessage()  : bool
Add message to stack to show or write to file Přidá zprávu do zásobníku pro zobrazení uživateli inbo do logu.
arrayCleanUP()  : array
Remove all @ items from array
assignResultIDs()  : mixed
Assign result IDs to its source objects
changeExternalID()  : array
Change Value of external id identified by selector. Add new if not exists
code()  : string
Returns code:CODE
companyUrlToOptions()  : array
Convert companyUrl provided by CustomButton to options array
configToEnv()  : mixed
Export current/given configutation into Environment
contentTypeToResponseFormat()  : string
Obtain json for application/json
controlMandatoryColumns()  : array
Control data for mandatory columns presence.
controlReadOnlyColumns()  : array
Control data for readonly columns presence.
copy()  : RW|null
Make Copy of given record with optional modifiactions
createNew()  : bool
Create New Label for given evidencies
curlInit()  : bool
Inicializace CURL
dateToFlexiDate()  : mixed
PHP Date object to AbraFlexi date format
dateToFlexiDateTime()  : mixed
PHP Date object to AbraFlexi date format
deleteFromAbraFlexi()  : bool
Smaže záznam Delete record in AbraFlexi
disconnect()  : mixed
Odpojení od AbraFlexi.
doCurlRequest()  : int
Vykonej HTTP požadavek
downloadInFormat()  : string|null
Uloží dokument v daném formátu do složky v systému souborů Save document in given format to directory in filesystem
error500Reporter()  : mixed
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
extractResultIDs()  : array
Extract IDs from AbraFlexi response Array
extractUrlParams()  : mixed
Oddělí z pole podmínek ty jenž patří za ? v URL požadavku
fixRecordTypes()  : array
Fix AbraFlexi record field types
fixResponseTypes()  : array
Fix field types in AbraFlexi server response
flexiDateTimeToDateTime()  : DateTime
AbraFlexi dateTime to PHP DateTime conversion
flexiDateToDateTime()  : DateTime
AbraFlexi date to PHP DateTime conversion
flexiUrl()  : string
Generuje fragment url pro filtrování.
getAbraFlexiURL()  : string
Gives You URL for Current Record in AbraFlexi web interface
getActionsInfo()  : array
Obtain actions for current (or given) evidence
getAllFromAbraFlexi()  : array
Vrací z AbraFlexi sloupečky podle podmínek.
getApiURL()  : string
Gives you current ApiURL with given format suffix
getAvailbleLabels()  : array
Obtain list of availble labels for given object
getColumnInfo()  : array
Gives you properties for (current) evidence column
getColumnsFromAbraFlexi()  : array
Vrací z AbraFlexi sloupečky podle podmínek.
getColumnsFromFlexiBee()  : array
Temporary Backward compatibility
getColumnsInfo()  : array
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
Get Current connection options for use in another object
getDataForJSON()  : array
Get Data Fragment specific for current object
getErrors()  : array
Last operation errors
getEvidence()  : string
Vrací právě používanou evidenci pro komunikaci Obtain current used evidence
getEvidenceInfo()  : array
Obtain info for current (or given) evidence
getEvidenceName()  : array
Obtain name for current (or given) evidence path
getEvidenceURL()  : string
Return basic URL for used Evidence
getExternalID()  : string|array
Vrací hodnotu daného externího ID
getExternalIDs()  : array
gives you currently loaded extermal IDs
getFirstRecordID()  : string|null
Obtain ID of first record in evidence
getFlexiData()  : array
Načte data z AbraFlexi.
getFlexiRow()  : array
Načte řádek dat z AbraFlexi.
getGlobalVersion()  : int
Obtain actual GlobalVersion Vrací aktuální globální verzi změn
getInFormat()  : string|null
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.
getLabels()  : array
Obtain labels for current record
getLastInsertedId()  : int
Give you last inserted record ID.
getLastOperationType()  : string
Get Last operation type
getNextRecordID()  : int|null
Get previous record ID
getOfflineColumnsInfo()  : array
Obtain structure for current (or given) evidence
getOnlineColumnsInfo()  : array
Obtain Current evidence Live structure
getPostFields()  : string
Get Content ready to be send as POST body
getPrevRecordID()  : int|null
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()  : string|int|null
Obtain record/object identificator extId: code: or id: Vrací identifikátor objektu extId: code: nebo id:
getRelationsInfo()  : array
Obtain relations for current (or given) evidence
getReportsInfo()  : array
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()  : array
Obtain established relations listing
idExists()  : bool
Test if given record ID exists in AbraFlexi.
ignore404()  : bool
Set or get ignore not found pages flag
insertToAbraFlexi()  : array
Save record (if evidence allow to).
join()  : bool
Join another Flexi Object
listToArray()  : array
Convert coma-separated list to array
loadFromAbraFlexi()  : int
Načte záznam z AbraFlexi a uloží v sobě jeho data Read AbraFlexi record and store it inside od object
logBanner()  : mixed
Add Info about used user, server and libraries
login()  : bool
Try to Sign in current user to AbraFlexi and keep authSessionId
logout()  : array
End (current's user) session
object2array()  : array
Převede rekurzivně Objekt na pole.
objectToID()  : array
Převede rekurzivně v poli všechny objekty na jejich identifikátory.
parseError()  : int
Parse error message response
parseResponse()  : array
Parse Response array
performAction()  : bool
Perform given action (if availble) on current evidence/record
performRequest()  : array|bool
Funkce, která provede I/O operaci a vyhodnotí výsledek.
processInit()  : mixed
Zinicializuje objekt dle daných dat. Možné hodnoty:
rawJsonToArray()  : array
Convert AbraFlexi Response JSON to Array
rawResponseToArray()  : array
Parse Raw AbraFlexi response in several formats
rawXmlToArray()  : array
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()  : mixed
Save RAW Curl Request & Response to files in Temp directory
saveResponseToFile()  : mixed
Save current object to file
sendByMail()  : bool
Send Document by mail
sendUnsent()  : int
Send all unsent Documents by eMail
setAction()  : bool
Nastaví druh prováděné akce.
setCompany()  : mixed
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.
setLabel()  : bool
Set Label for Current Object record
setMyKey()  : bool
Set Record Key
setObjectName()  : string
Set internal Object name
setPostFields()  : mixed
Připraví data pro odeslání do AbraFlexi
setPrefix()  : mixed
Set URL prefix
setUp()  : mixed
SetUp Object to be ready for work
sync()  : bool
Insert current data into AbraFlexi and load actual record data back
takeData()  : int
Take data for object. separate external IDs
timestampToFlexiDate()  : string
Convert Timestamp to AbraFlexi Date format.
timestampToFlexiDateTime()  : string
Convert Timestamp to Flexi DateTime format.
uncode()  : string
Returns CODE without code: prefix
unifyResponseFormat()  : array
Return the same response format for one and multiplete results
unsetLabel()  : bool
UnSet Label for Current Object record
updateApiURL()  : mixed
Update $this->apiURL
updateColumnsInfo()  : mixed
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
vazbaAdd()  : mixed
Přidá uživatelskou vazbu
vazbaDel()  : mixed
Smaže uživatelskou vazbu
xml2array()  : array
Convert XML to array.

Properties

$actionsAvailable

Pole akcí které podporuje ta která evidence

public array $actionsAvailable = null
Tags
link

Např. Akce faktury

$apiURL

URL of object data in AbraFlexi

public string $apiURL = null

$authSessionId

Session ID

public string $authSessionId = null

$chained

Chained Objects

public array $chained = []

$codes

Used codes storage.

public array $codes = null

$curl

Curl Handle.

public resource $curl = null

$curlInfo

Informace o posledním HTTP requestu.

public mixed $curlInfo

$DateFormat

Formating string for \DateTime::format() for date columns

public static string $DateFormat = 'Y-m-d'

$DateTimeFormat

Formating string for \DateTime::format() for datetime columns

public static string $DateTimeFormat = 'Y-m-d\TH:i:s.u+P'

$defaultHttpHeaders

public array $defaultHttpHeaders = []

$evidence

Evidence užitá objektem.

public string $evidence = 'stitek'

$evidenceInfo

Detaily evidence užité objektem

public array $evidenceInfo = []

$fbKeyColumn

Klíčový idendifikátor záznamu.

public string $fbKeyColumn = 'id'

$globalVersion

Number from @globalVersion

public int $globalVersion = null

$infoDir

Where to get JSON files with evidence stricture etc.

public static string $infoDir = __DIR__ . '/../../static'

$init

Identifikační řetězec.

public string $init = null

$lastCurlError

Informace o poslední HTTP chybě.

public string $lastCurlError = null

$lastCurlResponse

Raw Content of last curl response

public string $lastCurlResponse

$lastInsertedID

Last Inserted ID.

public int $lastInsertedID = null

$lastResponseCode

HTTP Response code of last request

public int $lastResponseCode = null

$lastResult

Last operation result data or message(s)

public array $lastResult = null

$libVersion

Version of AbraFlexi library

public static string $libVersion = '1.37'

$myCreateColumn

Sloupeček obsahující datum vložení záznamu do shopu.

public string $myCreateColumn = 'false'

$myLastModifiedColumn

Slopecek 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'

$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 $password = null

$postFields

Body data for next curl POST operation

public string $postFields = null

$prefix

Default Line Prefix.

public string $prefix = '/c/'

$protoVersion

Communication protocol version used.

public string $protoVersion = '1.0'

$refreshToken

Token obtained during login procedure

public string $refreshToken = null

$reportRecipient

Send Error500 Report to

public string $reportRecipient = 'podpora@abraflexi.eu'

$resultField

Data block in response field.

public string $resultField = 'results'

$rowCount

Number from @rowCount in response

public int $rowCount = null

$throwException

Throw Exception in case of AbraFlexi error

public bool $throwException = false

$timeout

Override cURL timeout

public int $timeout = null

$url

[protocol://]Server[:port]

public string $url = null

$urlParams

Parmetry pro URL

public array $urlParams = [ '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
link

Všechny podporované parametry

$user

REST API Username

public string $user = null

$vsbToEvidencePath

Evidence Path for vsb supported by label

public static array $vsbToEvidencePath = [ 'vsbAdr' => 'adresar', // Adresář 'vsbBan' => 'banka', // Banka // 'vsbCis' => 'ciselnik', // Číselníky 'vsbFap' => 'faktura-prijata', // Přijaté faktury 'vsbFav' => 'faktura-vydana', // Vydané faktury // 'vsbInt' => '' // Interní doklady 'vsbKatalog' => 'cenik', // Adresář // 'vsbMaj' => '', // Majetek // 'vsbMzd' => 'mzda', // Mzdy 'vsbNap' => 'nabidka-prijata', // Nabídky přijaté 'vsbNav' => 'nabidka-vydana', // Nabídky vydané 'vsbObp' => 'objednavka-prijata', // Objednávky přijaté 'vsbObv' => 'objednavka-vydana', // Objednávky vydané 'vsbPhl' => 'pohledavka', // Pohledávky 'vsbPok' => 'pokladna', // Pokladna 'vsbPpp' => 'poptavka-prijata', // Poptávky přijaté 'vsbPpv' => 'poptavka-vydana', // Poptávky vydané 'vsbSkl' => 'sklad', // Sklad 'vsbZav' => 'zavazek', ]

$errors

Array of errors caused by last request

protected array $errors = []

$ignoreNotFound

Save 404 results to log ?

protected bool $ignoreNotFound = false

$responseStats

Last Request response stats

protected array $responseStats = null

$columnsInfo

Columns Info for serveral evidencies

private array $columnsInfo = []

$reports

List of Error500 reports sent

private array $reports = []

$sourceId

Record Copy helper

private int $sourceId = null

Methods

__construct()

Class for read only interaction with AbraFlexi.

public __construct([mixed $init = null ][, array $options = [] ]) : mixed
Parameters
$init : mixed = null

default record id or initial data. See processInit()

$options : array = []

Connection settings and other options override

Return values
mixed

__destruct()

Disconnect CURL befere pass away

public __destruct() : mixed
Return values
mixed

__toString()

Obtain record/object identificator code: or id: Vrací identifikátor objektu code: nebo id:

public __toString() : string
Tags
link

Identifikátory záznamů

Return values
string

indentifikátor záznamu reprezentovaného objektem

__wakeup()

Reconnect After unserialization

public __wakeup() : mixed
Return values
mixed

addArrayToBranch()

Add Data to evidence Branch Přidá data do větve

public addArrayToBranch(array $data[, string $relationPath = 'polozkyDokladu' ][, bool $removeAll = false ]) : bool
Parameters
$data : array

pole dat

$relationPath : string = 'polozkyDokladu'

path evidence (relation) pro vkládaná data

$removeAll : bool = false
Tags
thanksto

Karel Běl

see
Relations
Return values
bool

Operation success

addDefaultUrlParams()

public addDefaultUrlParams(string $urlRaw) : mixed
Parameters
$urlRaw : string
Return values
mixed

addExternalID()

Add External ID to Current Record

public addExternalID(string $extId) : array
Parameters
$extId : string

ext:whatever:123 or simplay whatever:123

Return values
array

Insert result

addObjectToBranch()

Vloží do větve data z objektu

public addObjectToBranch(AbraFlexiRO $object[, bool $removeAll = false ]) : mixed
Parameters
$object : AbraFlexiRO

objekt evidence

$removeAll : bool = false

flush older items

Return values
mixed

addStatusMessage()

Add message to stack to show or write to file Přidá zprávu do zásobníku pro zobrazení uživateli inbo do logu.

public addStatusMessage(string $message[, string $type = 'info' ][, string $caller = null ]) : bool
Parameters
$message : string

text zpravy

$type : string = 'info'

fronta

$caller : string = null

Message source name

Return values
bool

message added

arrayCleanUP()

Remove all @ items from array

public static arrayCleanUP(array $data) : array
Parameters
$data : array

original data

Return values
array

data without @ columns

assignResultIDs()

Assign result IDs to its source objects

public assignResultIDs(array $candidates) : mixed
Parameters
$candidates : array

AbraFlexi insert IDs prepared by extractResultIDs()

Return values
mixed

changeExternalID()

Change Value of external id identified by selector. Add new if not exists

public changeExternalID(string $selector, string|int $newValue[, string|int $forID = null ]) : array
Parameters
$selector : string

ext:$selector:$newValue

$newValue : string|int

string or number

$forID : string|int = null

Other than current record id

Return values
array

operation result

code()

Returns code:CODE

public static code(string $code) : string
Parameters
$code : string
Return values
string

companyUrlToOptions()

Convert companyUrl provided by CustomButton to options array

public static companyUrlToOptions(string $companyUrl) : array
Parameters
$companyUrl : string
Return values
array

Options

configToEnv()

Export current/given configutation into Environment

public configToEnv([array $opts = [] ]) : mixed
Parameters
$opts : array = []
Return values
mixed

contentTypeToResponseFormat()

Obtain json for application/json

public contentTypeToResponseFormat(string $contentType[, string $url = null ]) : string
Parameters
$contentType : string
$url : string = null
Return values
string

response format

controlMandatoryColumns()

Control data for mandatory columns presence.

public controlMandatoryColumns([array $data = null ]) : array
Parameters
$data : array = null
Tags
deprecated

since version 1.8.7

Return values
array

List of missing columns. Empty if all is ok

controlReadOnlyColumns()

Control data for readonly columns presence.

public controlReadOnlyColumns([array $data = null ]) : array
Parameters
$data : array = null
Return values
array

List of ReadOnly columns. Empty if all is ok

copy()

Make Copy of given record with optional modifiactions

public copy(int $source[, array $overrides = [] ]) : RW|null

!!!Experimental Feature!!!

Parameters
$source : int
$overrides : array = []
Return values
RW|null

copied record object or null in case of failure

createNew()

Create New Label for given evidencies

public createNew(string $name, array $evidences[, array $options = [] ]) : bool
Parameters
$name : string

Label Name

$evidences : array

Evidence code list ex: ['faktura-vydana','faktura-prijata']

$options : array = []

Additional Label properties ex: ['kod'=>'EXAMPLE','skupVybKlic'=>'SKUPINA_STITKU']

Return values
bool

success

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
Return values
mixed

dateToFlexiDateTime()

PHP Date object to AbraFlexi date format

public static dateToFlexiDateTime(DateTime $dateTime) : mixed
Parameters
$dateTime : DateTime
Return values
mixed

deleteFromAbraFlexi()

Smaže záznam Delete record in AbraFlexi

public deleteFromAbraFlexi([int|string $id = null ]) : bool
Parameters
$id : int|string = null

identifikátor záznamu

Return values
bool

Response code is 200 ?

disconnect()

Odpojení od AbraFlexi.

public disconnect() : mixed
Return values
mixed

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
link

Sestavování URL

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|null
Parameters
$format : string

pdf/csv/xml/json/ ...

$destDir : string = './'

where to put file (prefix)

$reportName : string = null

Template used to generate PDF

Return values
string|null

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 $errorResponse) : mixed
Parameters
$errorResponse : array

result of parseError();

Return values
mixed

evidenceToClassName()

Gives you AbraFlexi class name for Given Evidence

public static evidenceToClassName(string $evidence) : string
Parameters
$evidence : string
Return values
string

Class name

evidenceUrlWithSuffix()

Add suffix to Evidence URL

public evidenceUrlWithSuffix(string $urlSuffix) : string
Parameters
$urlSuffix : string
Return values
string

extractResultIDs()

Extract IDs from AbraFlexi response Array

public extractResultIDs(array $resultInfo) : array
Parameters
$resultInfo : array

AbraFlexi response

Return values
array

List of [ 'evidence1'=>[ 'original-id'=>numericID,'original-id2'=>numericID2 ], 'evidence2'=> ... ]

extractUrlParams()

Oddělí z pole podmínek ty jenž patří za ? v URL požadavku

public extractUrlParams(array &$conditions, array &$urlParams) : mixed
Parameters
$conditions : array

pole podmínek - rendrují se do ()

$urlParams : array

pole parametrů - rendrují za ?

Tags
link

Sestavování URL

Return values
mixed

fixRecordTypes()

Fix AbraFlexi record field types

public fixRecordTypes(array $record[, string $evidence = null ]) : array
Parameters
$record : array
$evidence : string = null

force other than current

Tags
throws
Exception
Return values
array

with items typed

fixResponseTypes()

Fix field types in AbraFlexi server response

public fixResponseTypes(array $response) : array
Parameters
$response : array

raw response

Return values
array

types resolved

flexiDateTimeToDateTime()

AbraFlexi dateTime to PHP DateTime conversion

public static flexiDateTimeToDateTime(string $flexidatetime) : DateTime
Parameters
$flexidatetime : string

2017-09-26T10:00:53.755+02:00 or older 2017-05-19T00:00:00+02:00

Return values
DateTime

| false

flexiDateToDateTime()

AbraFlexi date to PHP DateTime conversion

public static flexiDateToDateTime(string $flexidate) : DateTime
Parameters
$flexidate : string

2017-05-26 or 2017-05-26+02:00

Return values
DateTime

| false

flexiUrl()

Generuje fragment url pro filtrování.

public static flexiUrl(array $data[, string $joiner = 'and' ][, string $defop = 'eq' ]) : string
Parameters
$data : array

key=>values; value can bee class DatePeriod, DateTime or Array

$joiner : string = 'and'

default and/or

$defop : string = 'eq'

default operator

Tags
see
https://www.abraflexi.eu/api/dokumentace/ref/filters
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
Parameters
$evidence : string = null
Return values
array

Evidence structure

getAllFromAbraFlexi()

Vrací z AbraFlexi sloupečky podle podmínek.

public getAllFromAbraFlexi([array|int|string $conditions = null ][, string $indexBy = null ]) : array
Parameters
$conditions : array|int|string = null

pole podmínek nebo ID záznamu

$indexBy : string = null

klice vysledku naplnit hodnotou ze sloupečku

Return values
array

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

getAvailbleLabels()

Obtain list of availble labels for given object

public static getAvailbleLabels(RO $object) : array
Parameters
$object : RO
Return values
array

getColumnInfo()

Gives you properties for (current) evidence column

public getColumnInfo(string $column[, string $evidence = null ]) : array
Parameters
$column : string

name of column

$evidence : string = null

evidence name if different

Return values
array

column properties or null if column not exits

getColumnsFromAbraFlexi()

Vrací z AbraFlexi sloupečky podle podmínek.

public getColumnsFromAbraFlexi(string|string[] $columnsList[, array $conditions = [] ][, string $indexBy = null ]) : array
Parameters
$columnsList : string|string[]

seznam položek nebo úrověň detailu: id|summary|full

$conditions : array = []

pole podmínek nebo ID záznamu

$indexBy : string = null

Sloupeček podle kterého indexovat záznamy

Return values
array

getColumnsFromFlexiBee()

Temporary Backward compatibility

public getColumnsFromFlexiBee(string|string[] $columnsList[, array $conditions = [] ][, string $indexBy = null ]) : array
Parameters
$columnsList : string|string[]

seznam položek nebo úrověň detailu: id|summary|full

$conditions : array = []

pole podmínek nebo ID záznamu

$indexBy : string = null

Sloupeček podle kterého indexovat záznamy

Tags
deprecated

since version 2.0

Return values
array

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
Parameters
$evidence : string = null
Return values
array

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
Return values
array

usable as second constructor parameter

getDataForJSON()

Get Data Fragment specific for current object

public getDataForJSON([array $data = null ]) : array
Parameters
$data : array = null
Return values
array

getErrors()

Last operation errors

public getErrors() : array
Return values
array

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 = null ]) : array
Parameters
$evidence : string = null
Return values
array

Evidence info

getEvidenceName()

Obtain name for current (or given) evidence path

public getEvidenceName([string $evidence = null ]) : array
Parameters
$evidence : string = null

Evidence Path

Return values
array

Evidence info

getEvidenceURL()

Return basic URL for used Evidence

public getEvidenceURL() : string
Tags
link

Sestavování URL

Return values
string

Evidence URL

getExternalID()

Vrací hodnotu daného externího ID

public getExternalID([string $want = null ]) : string|array
Parameters
$want : string = null

Namespace Selector. If empty,you obtain the first one.

Return values
string|array

one id or array if multiplete

getExternalIDs()

gives you currently loaded extermal IDs

public getExternalIDs() : array
Return values
array

getFirstRecordID()

Obtain ID of first record in evidence

public getFirstRecordID() : string|null
Return values
string|null

id or null if no records

getFlexiData()

Načte data z AbraFlexi.

public getFlexiData([string $suffix = '' ][, string|array $conditions = null ]) : array
Parameters
$suffix : string = ''

dotaz

$conditions : string|array = null

Custom filters or modifiers

Return values
array

Data obtained

getFlexiRow()

Načte řádek dat z AbraFlexi.

public getFlexiRow(int $recordID) : array
Parameters
$recordID : int

id požadovaného záznamu

Return values
array

getGlobalVersion()

Obtain actual GlobalVersion Vrací aktuální globální verzi změn

public getGlobalVersion() : int
Tags
link

Globální Verze

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 ]) : string|null
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
link

PDF Exports

Return values
string|null

filename downloaded or none

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
Return values
string

getLabels()

Obtain labels for current record

public static getLabels(RO $object) : array
Parameters
$object : RO

data source

Tags
deprecated

since version 1.21

Return values
array

labels

getLastInsertedId()

Give you last inserted record ID.

public getLastInsertedId() : int
Return values
int

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 previous record ID

public getNextRecordID([array $conditions = [] ]) : int|null
Parameters
$conditions : array = []

optional

Return values
int|null

getOfflineColumnsInfo()

Obtain structure for current (or given) evidence

public getOfflineColumnsInfo([string $evidence = null ]) : array
Parameters
$evidence : string = null
Return values
array

Evidence structure

getOnlineColumnsInfo()

Obtain Current evidence Live structure

public getOnlineColumnsInfo([string $evidence = null ]) : array
Parameters
$evidence : string = null
Return values
array

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 $conditions = [] ]) : int|null
Parameters
$conditions : array = []

optional

Return values
int|null

getRecordCode()

Obtain record/object identificator code: Vrací identifikátor objektu code:

public getRecordCode() : string
Tags
link

Identifikátory záznamů

Return values
string

record code identifier

getRecordID()

Obtain record/object numeric identificator id: Vrací číselný identifikátor objektu id:

public getRecordID() : null|int
Tags
link

Identifikátory záznamů

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() : string|int|null
Tags
link

Identifikátory záznamů

Return values
string|int|null

record code identifier

getRelationsInfo()

Obtain relations for current (or given) evidence

public getRelationsInfo([string $evidence = null ]) : array
Parameters
$evidence : string = null
Return values
array

Evidence structure

getReportsInfo()

Get Current Evidence reports listing

public getReportsInfo() : array
Tags
link

Výběr reportu do PDF

Return values
array

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([mixed $id = null ]) : array
Parameters
$id : mixed = null
Return values
array

Null or Relations

idExists()

Test if given record ID exists in AbraFlexi.

public idExists([mixed $identifer = null ]) : bool
Parameters
$identifer : mixed = null

presence state

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

insertToAbraFlexi()

Save record (if evidence allow to).

public insertToAbraFlexi([array $data = null ]) : array

Uloží záznam (pokud to evidence dovoluje)

Parameters
$data : array = null

Data to save

Tags
throws
Exception

Evidence does not support Import

Return values
array

odpověď

join()

Join another Flexi Object

public join(RO &$object) : bool
Parameters
$object : RO
Return values
bool

adding to stack success

listToArray()

Convert coma-separated list to array

public static listToArray(string $listRaw) : array
Parameters
$listRaw : string
Return values
array

loadFromAbraFlexi()

Načte záznam z AbraFlexi a uloží v sobě jeho data Read AbraFlexi record and store it inside od object

public loadFromAbraFlexi([int|string $id = null ]) : int
Parameters
$id : 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 ]) : mixed
Parameters
$prefix : string = null

banner prefix text

$suffix : string = null

banner suffix text

Return values
mixed

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
Parameters
$username : string = null

force username to sign off

Tags
link

Logout Reference

Return values
array

server response

object2array()

Převede rekurzivně Objekt na pole.

public static object2array(object|array $object) : array
Parameters
$object : object|array
Return values
array

objectToID()

Převede rekurzivně v poli všechny objekty na jejich identifikátory.

public static objectToID(object|array $object) : array
Parameters
$object : object|array
Return values
array

parseError()

Parse error message response

public parseError(array $responseDecoded) : int
Parameters
$responseDecoded : array
Return values
int

number of errors processed

parseResponse()

Parse Response array

public parseResponse(array $responseDecoded, int $responseCode) : array
Parameters
$responseDecoded : array
$responseCode : int

Request Response Code

Return values
array

main data part of response

performAction()

Perform given action (if availble) on current evidence/record

public performAction(string $action[, string $method = 'int' ]) : bool
Parameters
$action : string

one of evidence actions

$method : string = 'int'

ext|int External method call operation in URL. Internal add the @action element to request body

Tags
url

https://demo.flexibee.eu/devdoc/actions

Return values
bool

operation success

performRequest()

Funkce, která provede I/O operaci a vyhodnotí výsledek.

public performRequest([string $urlSuffix = '' ][, string $method = 'GET' ][, string $format = null ]) : array|bool
Parameters
$urlSuffix : string = ''

část URL za identifikátorem firmy.

$method : string = 'GET'

HTTP/REST metoda

$format : string = null

Requested format

Return values
array|bool

Výsledek operace

processInit()

Zinicializuje objekt dle daných dat. Možné hodnoty:

public processInit(mixed $init) : mixed
  • 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
mixed

rawJsonToArray()

Convert AbraFlexi Response JSON to Array

public rawJsonToArray(string $rawJson) : array
Parameters
$rawJson : string
Return values
array

rawResponseToArray()

Parse Raw AbraFlexi response in several formats

public rawResponseToArray(string $responseRaw, string $format) : array
Parameters
$responseRaw : string

raw response body

$format : string

Raw Response format json|xml|etc

Return values
array

rawXmlToArray()

Convert AbraFlexi Response XML to Array

public rawXmlToArray(string $rawXML) : array
Parameters
$rawXML : string
Return values
array

recordExists()

Test if given record exists in AbraFlexi.

public recordExists([array|string|int $data = [] ]) : bool
Parameters
$data : array|string|int = []

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
link

description

Return values
string

authUserId or null in case of problems

saveDebugFiles()

Save RAW Curl Request & Response to files in Temp directory

public saveDebugFiles() : mixed
Return values
mixed

saveResponseToFile()

Save current object to file

public saveResponseToFile(string $destfile) : mixed
Parameters
$destfile : string

path to file

Return values
mixed

sendByMail()

Send Document by mail

public sendByMail(string $to, string $subject, string $body[, mixed $cc = null ]) : bool
Parameters
$to : string

Email ecipient

$subject : string

Email Subject

$body : string

Email Text

$cc : mixed = null
Tags
url

https://www.abraflexi.eu/api/dokumentace/ref/odesilani-mailem/

Return values
bool

mail sent status

setAction()

Nastaví druh prováděné akce.

public setAction(string $action) : bool
Parameters
$action : string
Tags
link

Provádění akcí

Return values
bool

setCompany()

Set used company.

public setCompany(string $company) : mixed

Nastaví Firmu.

Parameters
$company : string
Return values
mixed

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

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

setLabel()

Set Label for Current Object record

public static setLabel(string $label, RW $object) : bool
Parameters
$label : string
$object : RW
Tags
deprecated

since version 1.21

Return values
bool

success result ?

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) : mixed
Parameters
$data : string
Return values
mixed

setPrefix()

Set URL prefix

public setPrefix(string $prefix) : mixed
Parameters
$prefix : string
Return values
mixed

setUp()

SetUp Object to be ready for work

public setUp([array $options = [] ]) : mixed
Parameters
$options : array = []

Object Options ( user,password,authSessionId company,url,evidence, prefix,defaultUrlParams,debug, detail,offline,filter,ignore404,nativeTypes timeout,companyUrl,ver,throwException

Return values
mixed

sync()

Insert current data into AbraFlexi and load actual record data back

public sync([array $data = null ]) : bool
Parameters
$data : array = null

Initial data to save

Return values
bool

Operation success

takeData()

Take data for object. separate external IDs

public takeData(array $data) : int
Parameters
$data : array

Data to keep

Return values
int

number of records taken

timestampToFlexiDate()

Convert Timestamp to AbraFlexi Date format.

public static timestampToFlexiDate([int $timpestamp = null ]) : string
Parameters
$timpestamp : int = null
Return values
string

AbraFlexi Date or NULL

timestampToFlexiDateTime()

Convert Timestamp to Flexi DateTime format.

public static timestampToFlexiDateTime([int $timpestamp = null ]) : string
Parameters
$timpestamp : int = null
Return values
string

AbraFlexi DateTime or NULL

uncode()

Returns CODE without code: prefix

public static uncode(string $code) : string
Parameters
$code : string
Return values
string

unifyResponseFormat()

Return the same response format for one and multiplete results

public unifyResponseFormat(array $responseBody) : array
Parameters
$responseBody : array
Return values
array

unsetLabel()

UnSet Label for Current Object record

public static unsetLabel(string $label, RW $object) : bool
Parameters
$label : string
$object : RW
Tags
deprecated

since version 1.21

Return values
bool

success result ?

updateApiURL()

Update $this->apiURL

public updateApiURL() : mixed
Return values
mixed

updateColumnsInfo()

Update evidence info from array or online from properties.json or offline

public updateColumnsInfo([array $columnsInfo = null ][, string $evidence = null ]) : mixed
Parameters
$columnsInfo : array = null
$evidence : string = null
Return values
mixed

urlEncode()

convert unicode to entities for use with AbraFlexi queries

public static urlEncode(string $urlRaw) : string
Parameters
$urlRaw : string
Return values
string

urlizeId()

Prepare record ID to use in URL

public static urlizeId(mixed $id) : string
Parameters
$id : mixed
Return values
string

id ready for use in URL

xml2array()

Convert XML to array.

public static xml2array(string $xml) : array
Parameters
$xml : string
Return values
array

Search results