ExportJob Class Reference

Inheritance diagram for ExportJob:
BaseJob

Public Member Functions

 getTotalModelsProcessed ()
 run ()

Static Public Member Functions

static getDisplayName ()
static getType ()
static getRecommendedRunFrequencyContent ()

Protected Member Functions

 processExportItem (ExportItem $exportItem)
 processRedBeanModelDataProviderExport (ExportItem $exportItem, RedBeanModelDataProvider $dataProvider)
 processReportDataProviderExport (ExportItem $exportItem, ReportDataProvider $dataProvider)
 processMatrixReportDataProviderExport (ExportItem $exportItem, MatrixReportDataProvider $dataProvider)
 processIdsToExport (ExportItem $exportItem, $idsToExport)
 updateExportFileModelByExportItem ($content, ExportItem $exportItem)
 makeExportFileModelByContent ($content, $exportFileName)
 processInProgressExportItem (ExportItem $exportItem, ExportFileModel $exportFileModel, $offset)
 processCompletedExportItem (ExportItem $exportItem, ExportFileModel $exportFileModel)
 processCompletedWithSecurityExceptionExportItem (ExportItem $exportItem)
 processEndMemoryUsageMessage ($startTime)
 processExportPage (CDataProvider $dataProvider, $offset, &$headerData, &$data, $resolveForHeader)
 processReportExportPage (ReportDataProvider $dataProvider, $offset, &$headerData, &$data, $resolveForHeader)
 processExportModels (array $models, &$headerData, &$data, $resolveForHeader=true)
 runGarbageCollection ($model)
 getAsynchronousPageSize ()
 getAsynchronousMaximumModelsToProcess ()
 hasReachedMaximumProcessingCount ()
 addMaxmimumProcessingCountMessage (ExportItem $exportItem)
 addMaximumProcessingCountMessageForAllExportItems ()
 addMaximumMemoryUsageReachedForAllExportItems ()
 addMemoryMarkerMessageAfterPageIsProcessed ($startingMemoryUsage)
 getExportProcessCompletedNotificationRulesForExportItem (ExportItem $exportItem)

Protected Attributes

 $totalModelsProcessed = 0

Static Protected Attributes

static $loadJobQueueOnCleanupAndFallback = true

Detailed Description

For exports with many records we create jobs that will generate export file in background, and send notification to user with export download link, when export job is completed.

Definition at line 42 of file ExportJob.php.


Member Function Documentation

static getDisplayName (  )  [static]
Returns:
Translated label that describes this job type.

Reimplemented from BaseJob.

Definition at line 60 of file ExportJob.php.

static getType (  )  [static]
Returns:
The type of the NotificationRules

Reimplemented from BaseJob.

Definition at line 68 of file ExportJob.php.

static getRecommendedRunFrequencyContent (  )  [static]
Returns:
string

Reimplemented from BaseJob.

Definition at line 76 of file ExportJob.php.

getTotalModelsProcessed (  ) 
Returns:
int

Definition at line 84 of file ExportJob.php.

run (  ) 

After a Job is instantiated, the run method is called to execute the job.

Reimplemented from BaseJob.

Definition at line 92 of file ExportJob.php.

processExportItem ( ExportItem exportItem  )  [protected]
Parameters:
ExportItem $exportItem

Definition at line 139 of file ExportJob.php.

processRedBeanModelDataProviderExport ( ExportItem exportItem,
RedBeanModelDataProvider dataProvider 
) [protected]
Parameters:
ExportItem $exportItem
RedBeanModelDataProvider $dataProvider

Definition at line 168 of file ExportJob.php.

processReportDataProviderExport ( ExportItem exportItem,
ReportDataProvider dataProvider 
) [protected]
Parameters:
ExportItem $exportItem
ReportDataProvider $dataProvider

Definition at line 212 of file ExportJob.php.

processIdsToExport ( ExportItem exportItem,
idsToExport 
) [protected]
Parameters:
ExportItem $exportItem
$idsToExport 

Definition at line 268 of file ExportJob.php.

updateExportFileModelByExportItem ( content,
ExportItem exportItem 
) [protected]
Parameters:
$content 
ExportItem $exportItem
Returns:
A
Exceptions:
FailedToSaveFileModelException 

Definition at line 290 of file ExportJob.php.

makeExportFileModelByContent ( content,
exportFileName 
) [protected]
Parameters:
string $content
string $exportFileName
Returns:
ExportFileModel
Exceptions:
FailedToSaveFileModelException 

Definition at line 307 of file ExportJob.php.

processInProgressExportItem ( ExportItem exportItem,
ExportFileModel exportFileModel,
offset 
) [protected]
Parameters:
ExportItem $exportItem
ExportFileModel $exportFileModel
int $offset
Exceptions:
FailedToSaveFileModelException 

Definition at line 331 of file ExportJob.php.

processCompletedExportItem ( ExportItem exportItem,
ExportFileModel exportFileModel 
) [protected]
Parameters:
ExportItem $exportItem
ExportFileModel $exportFileModel
Exceptions:
FailedToSaveFileModelException 

Definition at line 348 of file ExportJob.php.

processCompletedWithSecurityExceptionExportItem ( ExportItem exportItem  )  [protected]
Parameters:
ExportItem $exportItem
Exceptions:
FailedToSaveFileModelException 

Definition at line 373 of file ExportJob.php.

processEndMemoryUsageMessage ( startTime  )  [protected]
Parameters:
integer $startTime

Definition at line 394 of file ExportJob.php.

processExportPage ( CDataProvider $  dataProvider,
offset,
&$  headerData,
&$  data,
resolveForHeader 
) [protected]
Parameters:
CDataProvider $dataProvider
int $offset
$headerData 
$data 
bool $resolveForHeader
Returns:
bool

Definition at line 417 of file ExportJob.php.

processExportModels ( array $  models,
&$  headerData,
&$  data,
resolveForHeader = true 
) [protected]
Parameters:
array $models
array $headerData
array $data
bool $resolveForHeader

Definition at line 474 of file ExportJob.php.

runGarbageCollection ( model  )  [protected]
Parameters:
$model 

Definition at line 497 of file ExportJob.php.

getAsynchronousPageSize (  )  [protected]
Returns:
int

Definition at line 514 of file ExportJob.php.

getAsynchronousMaximumModelsToProcess (  )  [protected]
Returns:
int

Definition at line 522 of file ExportJob.php.

hasReachedMaximumProcessingCount (  )  [protected]
Returns:
bool

Definition at line 530 of file ExportJob.php.

addMaxmimumProcessingCountMessage ( ExportItem exportItem  )  [protected]
Parameters:
ExportItem $exportItem

Definition at line 543 of file ExportJob.php.

addMemoryMarkerMessageAfterPageIsProcessed ( startingMemoryUsage  )  [protected]
Parameters:
int $startingMemoryUsage

Definition at line 570 of file ExportJob.php.

getExportProcessCompletedNotificationRulesForExportItem ( ExportItem exportItem  )  [protected]
Parameters:
ExportItem $exportItem
Returns:
ExportProcessCompletedNotificationRules

Definition at line 585 of file ExportJob.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat Apr 22 07:10:24 2017