Documentation

Lead_Exchange_Import_Controller extends Core_Servant_Properties
in package

Lead import CSV controller

Tags
subpackage

Lead

version
7.x
author

Hostmake LLC

copyright

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

Table of Contents

Properties

$_aConfig  : array<string|int, mixed>
CSV config
$_aInsertedLeadIDs  : array<string|int, mixed>
Array of inserted leads
$_allowedProperties  : array<string|int, mixed>
Allowed object properties
$_aUpdatedLeadIDs  : array<string|int, mixed>
Array of updated items
$_InsertedLeadsCount  : int
Count of inserted leads
$_oLead  : Lead_Model
Current lead
$_oSite  : Site_Model
Current site
$_propertiesValues  : array<string|int, mixed>
Properties values
$_unlimitedProperties  : bool
Object has unlimited number of properties
$_UpdatedLeadsCount  : int
Count of updated leads

Methods

__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
getCSVLine()  : array<string|int, mixed>
Get CSV line from file
getInsertedLeadsCount()  : int
Get inserted leads count
getUpdatedLeadsCount()  : int
Get updated leads count
import()  : mixed
Импорт CSV
set()  : self
Run when writing data to inaccessible properties
setLead()  : self
Set $this->_oLead
setUnlimitedProperties()  : self
Set unlimitedProperties
_incInsertedLeads()  : self
Increment inserted leads
_incUpdatedLeads()  : self
Increment updated leads
init()  : self
Initialization

Properties

$_aConfig

CSV config

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

$_aInsertedLeadIDs

Array of inserted leads

protected array<string|int, mixed> $_aInsertedLeadIDs = 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 - не обновлять существующие элементы 'importAction', )

$_aUpdatedLeadIDs

Array of updated items

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

$_InsertedLeadsCount

Count of inserted leads

protected int $_InsertedLeadsCount

$_propertiesValues

Properties values

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

$_unlimitedProperties

Object has unlimited number of properties

protected bool $_unlimitedProperties = \FALSE

$_UpdatedLeadsCount

Count of updated leads

protected int $_UpdatedLeadsCount

Methods

__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

getCSVLine()

Get CSV line from file

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

getInsertedLeadsCount()

Get inserted leads count

public getInsertedLeadsCount() : int
Return values
int

getUpdatedLeadsCount()

Get updated leads count

public getUpdatedLeadsCount() : int
Return values
int

import()

Импорт CSV

public import() : mixed
Tags
hostcms-event

Lead_Exchange_Import_Controller.onBeforeImport

hostcms-event

Lead_Exchange_Import_Controller.onAfterImport

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

_incInsertedLeads()

Increment inserted leads

protected _incInsertedLeads(int $iLeadId) : self
Parameters
$iLeadId : int

lead ID

Return values
self

_incUpdatedLeads()

Increment updated leads

protected _incUpdatedLeads(int $iLeadId) : self
Parameters
$iLeadId : int

item ID

Return values
self

init()

Initialization

protected init() : self
Return values
self

        
On this page

Search results