Documentation

Convertor extends Sand

Description of Convertor

Tags
author

Vítězslav Dvořák info@vitexsoftware.cz

Table of Contents

$input  : RO
Source Object
$output  : RO
Destination Object
$rules  : array
__construct()  : mixed
Convertor
baseClassName()  : string
Get Classname without namespace prefix
commonItems()  : array
Return itemes that same on both sides
conversion()  : RW
Perform Conversion
convertDocument()  : mixed
Convert AbraFlexi document
convertItems()  : bool
convert main document items
convertSubitems()  : mixed
Convert AbraFlexi documnet's subitems
getConvertorClassName()  : string
Name for class with rules for converting $this->input to $this->output
getInput()  : RO
Get input object here
getOutput()  : RO
Get output object here
prepareRules()  : mixed
Prepare conversion rules; in debug mode generate new empty new convertRule file
setDestination()  : mixed
Set Destination document
setSource()  : mixed
Set Source Documnet

Properties

$output

Destination Object

private RO $output

Methods

__construct()

Convertor

public __construct([RO $input = null ][, RW $output = null ][, ConvertorRule $ruler = null ]) : mixed
Parameters
$input : RO = null

Source

$output : RW = null

Destination

$ruler : ConvertorRule = null

force convertor rule class

Return values
mixed

baseClassName()

Get Classname without namespace prefix

public static baseClassName(object $object) : string
Parameters
$object : object
Return values
string

commonItems()

Return itemes that same on both sides

public commonItems() : array
Return values
array

conversion()

Perform Conversion

public conversion([bool $keepId = false ][, bool $addExtId = false ][, bool $keepCode = false ][, bool $handleAccounting = false ]) : RW
Parameters
$keepId : bool = false
$addExtId : bool = false
$keepCode : bool = false
$handleAccounting : bool = false

set columns "ucetni" like target or ignore it

Return values
RW

converted object ( unsaved )

convertDocument()

Convert AbraFlexi document

public convertDocument([bool $keepId = false ][, bool $addExtId = false ][, bool $keepCode = false ][, mixed $handleAccountig = false ]) : mixed
Parameters
$keepId : bool = false

keep item IDs

$addExtId : bool = false

add ext:originalEvidence:originalId

$keepCode : bool = false

keep items code

$handleAccountig : mixed = false
Return values
mixed

convertItems()

convert main document items

public convertItems() : bool
Return values
bool

conversion success

convertSubitems()

Convert AbraFlexi documnet's subitems

public convertSubitems(string $columnToTake) : mixed
Parameters
$columnToTake : string

usually "polozkyDokladu"

Return values
mixed

getConvertorClassName()

Name for class with rules for converting $this->input to $this->output

public getConvertorClassName() : string
Return values
string

getInput()

Get input object here

public getInput() : RO
Return values
RO

getOutput()

Get output object here

public getOutput() : RO
Return values
RO

prepareRules()

Prepare conversion rules; in debug mode generate new empty new convertRule file

public prepareRules(bool $keepId, bool $addExtId, bool $keepCode, bool $handleAccounting) : mixed
Parameters
$keepId : bool

Keep original ID in cloned document

$addExtId : bool

Add automatically generated ext:id based on source

$keepCode : bool

Keep original code: in cloned document

$handleAccounting : bool

set columns "ucetni" like source or ignore it

Tags
throws
Exception
Return values
mixed

setDestination()

Set Destination document

public setDestination(RO $destination) : mixed
Parameters
$destination : RO
Return values
mixed

setSource()

Set Source Documnet

public setSource(RO $source) : mixed
Parameters
$source : RO
Return values
mixed

Search results