BookingsExporter
extends BackgroundProcess
in package
Tags
Table of Contents
- $abortOption : mixed
- $action : mixed
- $columnsOption : mixed
- $completedTasksOption : mixed
- $fileOption : mixed
- $filterRoomOption : mixed
- $prefix : mixed
- $tasksCountOption : mixed
- __construct() : mixed
- abort() : mixed
- getCompletedTasksCount() : int
- getDownloadLink() : string|false
- getIdentifier() : string
- getProgress() : float
- getQueueSize() : int
- getTasksCount() : int
- isAborting() : mixed
- isInProgress() : bool
- pathToFile() : string
- save() : mixed
- setupOutput() : self
- after_task_done() : mixed
- afterComplete() : mixed
- complete() : mixed
- getColumns() : array<string|int, mixed>
- getFile() : mixed
- getFilterId() : int
- increaseCompletedTasksCount() : mixed
- increaseTasksCount() : mixed
- removeFile() : mixed
- setColumns() : mixed
- setCompletedTasksCount() : mixed
- setFile() : mixed
- setFilterId() : mixed
- setTasksCount() : mixed
- task() : bool
Properties
$abortOption
protected
mixed
$abortOption
$action
protected
mixed
$action
= 'bookings_csv'
$columnsOption
protected
mixed
$columnsOption
$completedTasksOption
protected
mixed
$completedTasksOption
$fileOption
protected
mixed
$fileOption
$filterRoomOption
protected
mixed
$filterRoomOption
$prefix
protected
mixed
$prefix
= 'mphb_bg'
$tasksCountOption
protected
mixed
$tasksCountOption
Methods
__construct()
public
__construct() : mixed
Return values
mixed —abort()
public
abort() : mixed
Return values
mixed —getCompletedTasksCount()
public
getCompletedTasksCount() : int
Return values
int —getDownloadLink()
public
getDownloadLink() : string|false
Return values
string|false —"http://example.com/wp-content/uploads/mphb/filename.csv" or false if the file was not created.
getIdentifier()
public
getIdentifier() : string
Return values
string —getProgress()
public
getProgress() : float
Return values
float —The progress value in range [0; 100].
getQueueSize()
public
getQueueSize() : int
Return values
int —Only the size of the queue left to proceed (exclude completed batches).
getTasksCount()
public
getTasksCount() : int
Return values
int —isAborting()
public
isAborting() : mixed
Return values
mixed —isInProgress()
public
isInProgress() : bool
Return values
bool —pathToFile()
public
pathToFile() : string
Return values
string —"/path/to/wordpress/wp-content/uploads/mphb/filename.csv"
save()
public
save() : mixed
Return values
mixed —setupOutput()
public
setupOutput(array<string|int, mixed> $args) : self
Parameters
- $args : array<string|int, mixed>
Return values
self —after_task_done()
protected
after_task_done() : mixed
Return values
mixed —afterComplete()
protected
afterComplete() : mixed
Return values
mixed —complete()
protected
complete() : mixed
Return values
mixed —getColumns()
protected
getColumns() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFile()
protected
getFile() : mixed
Return values
mixed —getFilterId()
protected
getFilterId() : int
Return values
int —increaseCompletedTasksCount()
protected
increaseCompletedTasksCount([int $amount = 1 ]) : mixed
Parameters
- $amount : int = 1
-
Optional. 1 by default.
Return values
mixed —increaseTasksCount()
protected
increaseTasksCount(int $amount) : mixed
Parameters
- $amount : int
Return values
mixed —removeFile()
protected
removeFile() : mixed
Return values
mixed —setColumns()
protected
setColumns(array<string|int, mixed> $columns) : mixed
Parameters
- $columns : array<string|int, mixed>
Return values
mixed —setCompletedTasksCount()
protected
setCompletedTasksCount(int $count) : mixed
Parameters
- $count : int
Return values
mixed —setFile()
protected
setFile(string $filename) : mixed
Parameters
- $filename : string
-
Filename like "filename.csv".
Return values
mixed —setFilterId()
protected
setFilterId(int $roomTypeId) : mixed
Parameters
- $roomTypeId : int
Return values
mixed —setTasksCount()
protected
setTasksCount(int $count) : mixed
Parameters
- $count : int
Return values
mixed —task()
protected
task(int $bookingId) : bool
Parameters
- $bookingId : int
-
All imported bookings already filtered.