Lead_Exchange_Import_Controller
extends Core_Servant_Properties
in package
Lead import CSV controller
Tags
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
$_oLead
Current lead
protected
Lead_Model
$_oLead
$_oSite
Current site
protected
Site_Model
$_oSite
$_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
__construct()
Constructor.
public
__construct(Site_Model $oSite) : mixed
Parameters
- $oSite : Site_Model
__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
selfaddAllowedProperties()
Add additional allowed properties
public
addAllowedProperties(array<string|int, mixed> $array) : self
Parameters
- $array : array<string|int, mixed>
-
array of properties' names
Return values
selfaddAllowedProperty()
Add additional allowed property
public
addAllowedProperty(string $property) : self
Parameters
- $property : string
-
property name
Return values
selfclear()
Clear object
public
clear() : self
Return values
selfgetCSVLine()
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
intgetUpdatedLeadsCount()
Get updated leads count
public
getUpdatedLeadsCount() : int
Return values
intimport()
Импорт CSV
public
import() : mixed
Tags
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
selfsetLead()
Set $this->_oLead
public
setLead(Lead_Model $oLead) : self
Parameters
- $oLead : Lead_Model
Return values
selfsetUnlimitedProperties()
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
selfinit()
Initialization
protected
init() : self