YetiForce PHP Documentation

OSSMailScanner_Record_Model extends Vtiger_Record_Model
in package

OSSMailScanner Record model class.

Tags
copyright

YetiForce Sp. z o.o

license

YetiForce Public License 3.0 (licenses/LicenseEN.txt or yetiforce.com)

author

Mariusz Krzaczkowski m.krzaczkowski@yetiforce.com

Table of Contents

$mainFolders  : array<string|int, mixed>
Main folders array.
$group  : array<string|int, mixed>
Groups list.
$user  : array<string|int, mixed>|bool
Active users list.
accontDelete()  : mixed
Delete user email accounts.
addScanHistory()  : int
Insert new scan history row.
bindMail()  : bool
Assign data to model.
deleteIdentities()  : mixed
Delete identity by id.
executeActions()  : array<string|int, mixed>
executeCron()  : bool|string
Execute cron task.
getActionsList()  : array<string|int, mixed>
Returns array list of actions.
getConfig()  : array<string|int, mixed>
Return mailscanner config.
getConfigFolderList()  : array<string|int, mixed>|string
Return folders config.
getCron()  : array<string|int, mixed>
The function returns information about OSSMailScanner Crons.
getCronTask()  : Cron
Cron data.
getEmailActionsListName()  : array<string|int, mixed>
Return email actions name list.
getEmailSearch()  : array<string|int, mixed>
Return email search results.
getEmailSearchList()  : array<string|int, mixed>
Return email search list.
getFolders()  : array<string|int, mixed>
Return user folders.
getGroupList()  : array<string|int, mixed>
Return groups list.
getHistoryStatus()  : string
Return history status label.
getIdentities()  : array<string|int, mixed>
Return user identities.
getScanHistory()  : array<string|int, mixed>
Return scan history.
getTypeFolder()  : int
Returns folder type.
getUidFolder()  : int
Return folder UID.
getUserList()  : array<string|int, mixed>
Return active users list.
isActiveScan()  : bool
State of scan action.
isConnection()  : bool
Function checks connection to mailbox.
isPermissionToScan()  : bool
State of scan action.
mailScan()  : array<string|int, mixed>
Scan mailbox for emails.
manualScanMail()  : array<string|int, mixed>
Manually scan mail.
mergeArray()  : array<string|int, mixed>
Merge arrays.
runRestartCron()  : mixed
Restart cron.
setActions()  : mixed
Update user actions.
setActiveScan()  : bool
Activate scan.
setConfigWidget()  : string
Update config widget param.
setEmailSearchList()  : mixed
Set email search list.
setFolderList()  : mixed
Update folder list for user.
updateScanHistory()  : bool
Update scan history row.
verificationCron()  : mixed
Verification cron.

Properties

$mainFolders

Main folders array.

public static array<string|int, mixed> $mainFolders = ['Received', 'Sent', 'Spam', 'Trash', 'All']

$group

Groups list.

protected array<string|int, mixed> $group = alse

$user

Active users list.

protected array<string|int, mixed>|bool $user = alse

Methods

accontDelete()

Delete user email accounts.

public static accontDelete(int $id) : mixed
Parameters
$id : int
Return values
mixed

addScanHistory()

Insert new scan history row.

public addScanHistory(array<string|int, mixed> $array) : int
Parameters
$array : array<string|int, mixed>
Tags
throws
Exception
Return values
int

bindMail()

Assign data to model.

public bindMail(array<string|int, mixed> $row) : bool
Parameters
$row : array<string|int, mixed>
Return values
bool

deleteIdentities()

Delete identity by id.

public deleteIdentities(int $id) : mixed
Parameters
$id : int
Return values
mixed

executeActions()

public static executeActions(int $account, OSSMail_Mail_Model $mail, string $folder[, array<string|int, mixed> $params = false ]) : array<string|int, mixed>
Parameters
$account : int
$mail : OSSMail_Mail_Model
$folder : string
$params : array<string|int, mixed> = false
Return values
array<string|int, mixed>

executeCron()

Execute cron task.

public executeCron(int $whoTrigger) : bool|string
Parameters
$whoTrigger : int
Return values
bool|string

getActionsList()

Returns array list of actions.

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

getConfig()

Return mailscanner config.

public static getConfig(bool|string $confType) : array<string|int, mixed>
Parameters
$confType : bool|string
Return values
array<string|int, mixed>

getConfigFolderList()

Return folders config.

public static getConfigFolderList([bool|string $folder = false ]) : array<string|int, mixed>|string
Parameters
$folder : bool|string = false
Return values
array<string|int, mixed>|string

getCron()

The function returns information about OSSMailScanner Crons.

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

getCronTask()

Cron data.

public static getCronTask() : Cron
Return values
Cron

getEmailActionsListName()

Return email actions name list.

public static getEmailActionsListName(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>
Return values
array<string|int, mixed>

getEmailSearch()

Return email search results.

public static getEmailSearch([string $module = false ][, mixed $onlyMailUitype = true ]) : array<string|int, mixed>
Parameters
$module : string = false
$onlyMailUitype : mixed = true
Return values
array<string|int, mixed>

getEmailSearchList()

Return email search list.

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

getFolders()

Return user folders.

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

getGroupList()

Return groups list.

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

getHistoryStatus()

Return history status label.

public getHistoryStatus(int $id) : string
Parameters
$id : int
Return values
string

getIdentities()

Return user identities.

public static getIdentities(int $id) : array<string|int, mixed>
Parameters
$id : int
Return values
array<string|int, mixed>

getScanHistory()

Return scan history.

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

getTypeFolder()

Returns folder type.

public static getTypeFolder(string $folder) : int
Parameters
$folder : string
Return values
int

getUidFolder()

Return folder UID.

public static getUidFolder(int $accountId, string $folder) : int
Parameters
$accountId : int
$folder : string
Return values
int

getUserList()

Return active users list.

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

isActiveScan()

State of scan action.

public static isActiveScan([int|null $scanId = null ]) : bool
Parameters
$scanId : int|null = null
Return values
bool

isConnection()

Function checks connection to mailbox.

public isConnection(array<string|int, mixed> $account) : bool
Parameters
$account : array<string|int, mixed>
Return values
bool

isPermissionToScan()

State of scan action.

public static isPermissionToScan([mixed $whoTrigger = '' ]) : bool
Parameters
$whoTrigger : mixed = ''
Return values
bool

mailScan()

Scan mailbox for emails.

public static mailScan(resource $mbox, array<string|int, mixed> $account, string $folder, int $scan_id, int $countEmails) : array<string|int, mixed>
Parameters
$mbox : resource
$account : array<string|int, mixed>
$folder : string

Character encoding UTF-8

$scan_id : int
$countEmails : int
Tags
throws
ReflectionException
throws
Exception
Return values
array<string|int, mixed>

manualScanMail()

Manually scan mail.

public manualScanMail(int $uid, string $folder, array<string|int, mixed> $account) : array<string|int, mixed>
Parameters
$uid : int
$folder : string
$account : array<string|int, mixed>
Tags
throws
AppException
Return values
array<string|int, mixed>

mergeArray()

Merge arrays.

public static mergeArray(array<string|int, mixed> $tab1, array<string|int, mixed> $tab2) : array<string|int, mixed>
Parameters
$tab1 : array<string|int, mixed>
$tab2 : array<string|int, mixed>
Return values
array<string|int, mixed>

runRestartCron()

Restart cron.

public static runRestartCron(int $scanId) : mixed
Parameters
$scanId : int
Return values
mixed

setActions()

Update user actions.

public static setActions(int $userid, string $value) : mixed
Parameters
$userid : int
$value : string
Return values
mixed

setActiveScan()

Activate scan.

public static setActiveScan(string $whoTrigger[, int|null $scanId = null ]) : bool
Parameters
$whoTrigger : string
$scanId : int|null = null
Return values
bool

setConfigWidget()

Update config widget param.

public setConfigWidget(string $confType, string $type, string $value) : string
Parameters
$confType : string
$type : string
$value : string
Return values
string

setEmailSearchList()

Set email search list.

public static setEmailSearchList(string $value) : mixed
Parameters
$value : string
Return values
mixed

setFolderList()

Update folder list for user.

public static setFolderList(int $user, array<string|int, mixed> $foldersByType) : mixed
Parameters
$user : int
$foldersByType : array<string|int, mixed>
Return values
mixed

updateScanHistory()

Update scan history row.

public static updateScanHistory(int $id, array<string|int, mixed> $array) : bool
Parameters
$id : int
$array : array<string|int, mixed>
Return values
bool

verificationCron()

Verification cron.

public static verificationCron() : mixed
Return values
mixed

Search results