Documentation

Informationsystem_Item_Import_Csv_Controller extends Core_Servant_Properties

Information systems import CSV controller

Tags
subpackage

Informationsystem

version
7.x
author

Hostmake LLC

copyright

© 2005-2022 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

$_aAdditionalGroups  : array<string|int, mixed>
List of additional group
$_aClearedPropertyValues  : array<string|int, mixed>
Array of property values
$_aConfig  : array<string|int, mixed>
CSV config
$_aExternalProperties  : array<string|int, mixed>
List of external properties
$_aExternalPropertiesDesc  : array<string|int, mixed>
List of descriptions of external properties
$_aExternalPropertiesSmall  : array<string|int, mixed>
List of small parts of external properties
$_aInsertedGroupIDs  : array<string|int, mixed>
Array of inserted groups
$_aInsertedItemIDs  : array<string|int, mixed>
Array of inserted items
$_allowedProperties  : array<string|int, mixed>
Allowed object properties
$_aTags  : mixed
Array of cached tags
$_aUpdatedGroupIDs  : array<string|int, mixed>
Array of updated groups
$_aUpdatedItemIDs  : array<string|int, mixed>
Array of updated items
$_iCurrentGroupId  : int
ID of current group
$_iCurrentInformationsystemId  : int
ID of current informationsystem
$_InsertedGroupsCount  : int
Count of inserted groups
$_InsertedItemsCount  : int
Count of inserted items
$_oCurrentGroup  : Informationsystem_Group_Model
Current group
$_oCurrentInformationsystem  : Informationsystem_Model
Current informationsystem
$_oCurrentItem  : Informationsystem_Item_Model
Current item
$_propertiesValues  : array<string|int, mixed>
Properties values
$_sBigImageFile  : string
Path of the big image
$_sCurrentTags  : string
Current tags
$_sSmallImageFile  : string
Path of the small image
$_unlimitedProperties  : bool
Object has unlimited number of properties
$_UpdatedGroupsCount  : int
Count of updated groups
$_UpdatedItemsCount  : int
Count of updated items
__construct()  : mixed
Constructor.
__sleep()  : array<string|int, mixed>
Execute some routine before serialization
__toString()  : string
Convert object to string
__wakeup()  : self
Reestablish any database connections that may have been lost during serialization and perform other reinitialization tasks
addAllowedProperties()  : self
Add additional allowed properties
addAllowedProperty()  : self
Add additional allowed property
clear()  : self
Clear object
CorrectToEncoding()  : array<string|int, mixed>
Correct CSV-line encoding
getCSVLine()  : array<string|int, mixed>
Get CSV line from file
getInsertedGroupsCount()  : int
Get inserted groups count
getInsertedItemsCount()  : int
Get inserted items count
getUpdatedGroupsCount()  : int
Get updated groups count
getUpdatedItemsCount()  : int
Get updated items count
import()  : mixed
Импорт CSV
set()  : self
Run when writing data to inaccessible properties
setCurrentItem()  : self
Set $this->_oCurrentItem
setUnlimitedProperties()  : self
Set unlimitedProperties
_doSaveGroup()  : Informationsystem_Group
Save group
_getTags()  : array<string|int, mixed>
Get cached tags of array
_incInsertedGroups()  : self
Increment inserted groups
_incInsertedItems()  : self
Increment inserted items
_incUpdatedGroups()  : self
Increment updated groups
_incUpdatedItems()  : self
Increment updated items
init()  : self
Initialization

Properties

$_aAdditionalGroups

List of additional group

protected array<string|int, mixed> $_aAdditionalGroups = array()

$_aClearedPropertyValues

Array of property values

protected array<string|int, mixed> $_aClearedPropertyValues = array()

$_aConfig

CSV config

protected array<string|int, mixed> $_aConfig = \NULL

$_aExternalProperties

List of external properties

protected array<string|int, mixed> $_aExternalProperties = array()

$_aExternalPropertiesDesc

List of descriptions of external properties

protected array<string|int, mixed> $_aExternalPropertiesDesc = array()

$_aExternalPropertiesSmall

List of small parts of external properties

protected array<string|int, mixed> $_aExternalPropertiesSmall = array()

$_aInsertedGroupIDs

Array of inserted groups

protected array<string|int, mixed> $_aInsertedGroupIDs = array()

$_aInsertedItemIDs

Array of inserted items

protected array<string|int, mixed> $_aInsertedItemIDs = array()

$_allowedProperties

Allowed object properties

protected array<string|int, mixed> $_allowedProperties = array( // Кодировка импорта 'encoding', // Файл импорта 'file', // Позиция в файле импорта 'seek', // Ограничение импорта по времени 'time', // Ограничение импорта по количеству 'step', // Настройка CSV: разделитель 'separator', // Настройка CSV: ограничитель 'limiter', // Настройка CSV: первая строка - название полей 'firstlineheader', // Настройка CSV: массив соответствий полей CSV сущностям системы HostCMS 'csv_fields', // Путь к картинкам 'imagesPath', // Действие с существующими информационными элементами: // 1 - обновить существующие информационные элементы // 2 - не обновлять существующие информационные элементы // 3 - удалить содержимое информационной системы до импорта 'importAction', // Флаг, указывающий, включена ли индексация 'searchIndexation', 'deleteImage', )

$_aTags

Array of cached tags

protected mixed $_aTags = \NULL

$_aUpdatedGroupIDs

Array of updated groups

protected array<string|int, mixed> $_aUpdatedGroupIDs = array()

$_aUpdatedItemIDs

Array of updated items

protected array<string|int, mixed> $_aUpdatedItemIDs = array()

$_iCurrentGroupId

ID of current group

protected int $_iCurrentGroupId = 0

$_iCurrentInformationsystemId

ID of current informationsystem

protected int $_iCurrentInformationsystemId = 0

$_InsertedGroupsCount

Count of inserted groups

protected int $_InsertedGroupsCount

$_InsertedItemsCount

Count of inserted items

protected int $_InsertedItemsCount

$_propertiesValues

Properties values

protected array<string|int, mixed> $_propertiesValues = array()

$_sBigImageFile

Path of the big image

protected string $_sBigImageFile = ''

$_sCurrentTags

Current tags

protected string $_sCurrentTags

$_sSmallImageFile

Path of the small image

protected string $_sSmallImageFile = ''

$_unlimitedProperties

Object has unlimited number of properties

protected bool $_unlimitedProperties = \FALSE

$_UpdatedGroupsCount

Count of updated groups

protected int $_UpdatedGroupsCount

$_UpdatedItemsCount

Count of updated items

protected int $_UpdatedItemsCount

Methods

__construct()

Constructor.

public __construct(int $iCurrentInformationsystemId, int $iCurrentGroupId) : mixed
Parameters
$iCurrentInformationsystemId : int

Informationsystem ID

$iCurrentGroupId : int

current group ID

Return values
mixed

__sleep()

Execute some routine before serialization

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

__toString()

Convert object to string

public __toString() : string
Return values
string

__wakeup()

Reestablish any database connections that may have been lost during serialization and perform other reinitialization tasks

public __wakeup() : self
Return values
self

addAllowedProperties()

Add additional allowed properties

public addAllowedProperties(array<string|int, mixed> $array) : self
Parameters
$array : array<string|int, mixed>

array of properties' names

Return values
self

addAllowedProperty()

Add additional allowed property

public addAllowedProperty(string $property) : self
Parameters
$property : string

property name

Return values
self

clear()

Clear object

public clear() : self
Return values
self

CorrectToEncoding()

Correct CSV-line encoding

public static CorrectToEncoding(array<string|int, mixed> $sLine, string $encodeTo[, string $encodeFrom = 'UTF-8' ]) : array<string|int, mixed>
Parameters
$sLine : array<string|int, mixed>

current CSV-file line

$encodeTo : string

detination encoding

$encodeFrom : string = 'UTF-8'

source encoding

Tags
deprecated
6.9.7
Return values
array<string|int, mixed>

getCSVLine()

Get CSV line from file

public getCSVLine(mixed $fileDescriptor) : array<string|int, mixed>
Parameters
$fileDescriptor : mixed
Return values
array<string|int, mixed>

getInsertedGroupsCount()

Get inserted groups count

public getInsertedGroupsCount() : int
Return values
int

getInsertedItemsCount()

Get inserted items count

public getInsertedItemsCount() : int
Return values
int

getUpdatedGroupsCount()

Get updated groups count

public getUpdatedGroupsCount() : int
Return values
int

getUpdatedItemsCount()

Get updated items count

public getUpdatedItemsCount() : int
Return values
int

import()

Импорт CSV

public import() : mixed
Tags
hostcms-event

Informationsystem_Item_Import_Csv_Controller.onBeforeImport

hostcms-event

Informationsystem_Item_Import_Csv_Controller.onAfterImport

hostcms-event

Informationsystem_Item_Import_Csv_Controller.onBeforeFindByMarking

hostcms-event

Informationsystem_Item_Import_Csv_Controller.onAfterFindByMarking

hostcms-event

Informationsystem_Item_Import_Csv_Controller.oBeforeAdminUpload

hostcms-event

Informationsystem_Item_Import_Csv_Controller.onBeforeImportGroupProperty

hostcms-event

Informationsystem_Item_Import_Csv_Controller.onBeforeImportItemProperty

Return values
mixed

set()

Run when writing data to inaccessible properties

public set(string $property, string $value) : self
Parameters
$property : string

property name

$value : string

property value

Return values
self

setUnlimitedProperties()

Set unlimitedProperties

public setUnlimitedProperties([bool $value = TRUE ]) : self
Parameters
$value : bool = TRUE

default TRUR

Return values
self

_getTags()

Get cached tags of array

protected _getTags() : array<string|int, mixed>
Return values
array<string|int, mixed>

_incInsertedGroups()

Increment inserted groups

protected _incInsertedGroups(int $iGroupId) : self
Parameters
$iGroupId : int

group ID

Return values
self

_incInsertedItems()

Increment inserted items

protected _incInsertedItems(int $iItemId) : self
Parameters
$iItemId : int

item ID

Return values
self

_incUpdatedGroups()

Increment updated groups

protected _incUpdatedGroups(int $iGroupId) : self
Parameters
$iGroupId : int

group ID

Return values
self

_incUpdatedItems()

Increment updated items

protected _incUpdatedItems(int $iItemId) : self
Parameters
$iItemId : int

item ID

Return values
self

init()

Initialization

protected init() : self
Return values
self

Search results