Documentation

Convertor extends Sand
in package

Description of Convertor.

Tags
author

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

Table of Contents

$debug  : bool
$input  : RO
Source Object.
$output  : RO
Destination Object.
$ruler  : ConvertorRule
Keep the conversion rules.
__construct()  : mixed
Convertor.
baseClassName()  : string
Get ClassName without NameSpace prefix.
commonItems()  : array<string|int, mixed>
Return items that same on both sides.
conversion()  : RW
Perform Conversion.
convertItems()  : bool
convert main document items.
convertSubitems()  : void
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()  : void
Prepare conversion rules; in debug mode generate new empty new convertRule file.
setDestination()  : void
Set Destination document.
setSource()  : void
Set Source Document.

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 items that same on both sides.

public commonItems() : array<string|int, mixed>
Return values
array<string|int, mixed>

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 )

convertItems()

convert main document items.

public convertItems() : bool
Return values
bool

conversion success

convertSubitems()

Convert AbraFlexi documnet's subitems.

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

usually "polozkyDokladu"

Return values
void

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) : void
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
void

setDestination()

Set Destination document.

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

setSource()

Set Source Document.

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

Search results