Documentation

BatchMethod extends Base
in package

Batch method class.

Table of Contents

STATUS_COMPLETED  = 4
Completed
STATUS_ENABLED  = 1
Enebled
STATUS_HALTED  = 3
Halted
STATUS_RUNNING  = 2
Running
$allowedFields  : array<string|int, mixed>
$value  : mixed
$previousStatus  : mixed
Previous status
__construct()  : mixed
BatchMethod constructor.
delete()  : mixed
Delete.
deleteByMethod()  : void
Delete by method.
execute()  : mixed
Execute.
get()  : mixed
Function to get the value for a given key.
getArray()  : array<string|int, mixed>
Function to get the array values for a given key.
getData()  : array<string|int, mixed>
Function to get all the values of the Object.
getForHtml()  : mixed
Function to get the html encoded value for a given key.
getForSql()  : mixed
Function to get the value if its safe to use for SQL Query (column).
getKeys()  : array<string|int, string>
Function to get keys.
has()  : bool
Function to check if the key exists.
isCompleted()  : bool
Function check is status completed.
isEmpty()  : bool
Function to check if the key is empty.
isExists()  : bool
Function verifies if a duplicate of the entry already exists.
remove()  : mixed
Function to remove the value.
save()  : bool
Save.
set()  : $this
Function to set the value for a given key.
setData()  : $this
Function to set all the values.
setStatus()  : mixed
Set status.
log()  : mixed
Log.

Constants

STATUS_COMPLETED

Completed

public mixed STATUS_COMPLETED = 4

STATUS_ENABLED

Enebled

public mixed STATUS_ENABLED = 1

STATUS_RUNNING

Running

public mixed STATUS_RUNNING = 2

Properties

$allowedFields

protected array<string|int, mixed> $allowedFields = ['userid' => 'integer', 'status' => 'integer', 'params' => 'string', 'method' => 'string']

[name => type, ...]

$value

protected mixed $value

$previousStatus

Previous status

private mixed $previousStatus

Methods

__construct()

BatchMethod constructor.

public __construct([array<string|int, mixed> $values = [] ][, bool $encode = true ]) : mixed
Parameters
$values : array<string|int, mixed> = []
$encode : bool = true
Tags
throws
AppException
Return values
mixed

delete()

Delete.

public delete() : mixed
Return values
mixed

deleteByMethod()

Delete by method.

public static deleteByMethod(string $method) : void
Parameters
$method : string
Return values
void

execute()

Execute.

public execute() : mixed
Return values
mixed

get()

Function to get the value for a given key.

public get(string $key) : mixed
Parameters
$key : string
Return values
mixed

Value for the given key

getArray()

Function to get the array values for a given key.

public getArray(string $key[, array<string|int, mixed> $value = [] ]) : array<string|int, mixed>
Parameters
$key : string
$value : array<string|int, mixed> = []
Return values
array<string|int, mixed>

getData()

Function to get all the values of the Object.

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

getForHtml()

Function to get the html encoded value for a given key.

public getForHtml(string $key) : mixed
Parameters
$key : string
Return values
mixed

getForSql()

Function to get the value if its safe to use for SQL Query (column).

public getForSql(string $key[, bool $skipEmtpy = true ]) : mixed
Parameters
$key : string
$skipEmtpy : bool = true

Skip the check if string is empty

Return values
mixed

Value for the given key

getKeys()

Function to get keys.

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

has()

Function to check if the key exists.

public has(string $key) : bool
Parameters
$key : string
Return values
bool

isCompleted()

Function check is status completed.

public isCompleted() : bool
Return values
bool

isEmpty()

Function to check if the key is empty.

public isEmpty(string $key) : bool
Parameters
$key : string
Return values
bool

isExists()

Function verifies if a duplicate of the entry already exists.

public isExists() : bool
Return values
bool

remove()

Function to remove the value.

public remove(string $key) : mixed
Parameters
$key : string
Return values
mixed

save()

Save.

public save() : bool
Return values
bool

set()

Function to set the value for a given key.

public set(string $key, mixed $value) : $this
Parameters
$key : string
$value : mixed
Return values
$this

setData()

Function to set all the values.

public setData(mixed $values) : $this
Parameters
$values : mixed
Return values
$this

setStatus()

Set status.

public setStatus(int $status) : mixed
Parameters
$status : int
Return values
mixed

log()

Log.

private log(string $message) : mixed
Parameters
$message : string
Return values
mixed

        

Search results