Class DataTransfer
Bedita model base class
- Model
- AppModel
- BEAppModel
- DataTransfer
Located at models/business/data_transfer.php
Methods summary
public
|
|
public
mixed
|
|
public
array,
|
|
public
|
|
private
|
|
private
|
|
private
|
|
private
|
|
private
|
|
private
|
|
private
|
|
private
|
|
private
|
|
private
|
|
private
|
|
private
array
|
#
prepareObjectForExport( array & $object, integer $level = 0 )
clean object and prepare relation data |
private
|
|
private
|
|
private
|
|
private
|
|
private
|
|
private
array
|
|
private
|
#
copyFileToFolder( string $sourceBasePath, string $destBasePath, string $source )
Copy $source (from $sourceBasePath) to $destBasePath, creating subfolders if necessary |
private
|
|
private
|
|
private
|
|
private
|
|
private
|
|
private
|
|
private
|
|
private
string
|
|
private
|
|
private
|
|
private
|
Methods inherited from BEAppModel
am()
,
buildQueryStatement()
,
checkDate()
,
checkDuration()
,
checkFloat()
,
checkNumber()
,
containLevel()
,
fieldsString()
,
findObjects()
,
findObjectsAfterFilter()
,
findObjectsClauses()
,
findObjectsCount()
,
getBindingsLevel()
,
getDefaultDateFormat()
,
getDriver()
,
getEndQuote()
,
getLimitClausole()
,
getStartQuote()
,
setBindingsLevel()
,
setupDbParams()
,
toolbar()
Methods inherited from AppModel
Properties summary
public
boolean
|
$useTable
|
#
false
|
private
integer
|
$maxRelationLevels
|
#
2
|
protected
array
|
$objDefaults
|
#
array(
'status' => 'on',
'user_created' => '1',
'user_modified' => '1',
'lang' => 'ita',
'ip_created' => '127.0.0.1',
'syndicate' => 'off',
)
|
protected
array
|
$objMinimalSet
|
#
array(
'id',
'objectType'
)
|
protected
array
|
$relMinimalSet
|
#
array(
'idLeft',
'idRight',
'switch'
)
|
protected
array
|
$import
|
#
array(
'source' => array(
'string' => null, // (is_string(data)) ? data : null
'data' => array() // json_decode of data
),
'objects' => array(
'ids' => array(),
'types' => array()
),
'tree' => array(
'ids' => array(),
'parents' => array()
),
'relations' => array(
'ids' => array(),
'switches' => array()
),
'saveMap' => array(
// oldId => newId
),
'saveMode' => 1, // NEW
'logLevel' => 2 // INFO
)
|
protected
array
|
$export
|
#
array(
'destination' => array(
'byType' => array(
'ARRAY' => array(
'config' => array(),
'tree' => array(),
'objects' => array(),
'relations' => array()
),
'JSON' => '' // string
)
),
'logLevel' => 2, // INFO
'returnType' => 'JSON',
'filename' => null,
'all' => true,
'types' => null,
'relations' => null,
'objectUnsetFields' => array(
'user_created',
'user_modified',
'valid',
'ip_created',
'object_type_id',
'ObjectType',
'UserCreated',
'UserModified',
'User',
'Version',
'Permission',
'Annotation',
'area_id',
'object_path',
'parent_id',
'parent_path',
'priority',
'priority_order',
'syndicate'
),
'contain' => array(
'BEObject' => array(
'RelatedObject',
'ObjectProperty',
'LangText',
'Annotation',
'Category',
'GeoTag'
)
),
'contain-stream' => array(
'BEObject' => array(
'RelatedObject',
'ObjectProperty',
'LangText',
'Annotation',
'Category',
'GeoTag'
),
'Stream'
),
'media' => array(),
'customProperties' => array()
)
|
protected
array
|
$streamModels
|
#
array(
'Image',
'Video',
'Application',
)
|
protected
array
|
$result
|
#
array(
)
|
private
|
$logFile
|
|
private
|
$logLevel
|
|
protected
array
|
$logLevels
|
#
array(
'ERROR' => 0,
'WARN' => 1,
'INFO' => 2,
'DEBUG' => 3
)
|
protected
array
|
$saveModes
|
#
array(
'MERGE' => 0, // merge relations (always for imported objects)
'NEW' => 1, // create new object with new nickname
'OVERRIDE' => 2, // remove object with same nickname
'IGNORE' => 3, // ignore object
'UPDATE' => 4 // merge relations and update data
)
|
protected
array
|
$customPropertyDataTypes
|
#
array(
'number',
'date',
'text',
'options'
)
|