JobConfig
in package
JobConfig DTO
For legacy reasons
- camelCased by default for input (application)
- under_scored by default for output (DB)
Table of Contents
Constants
- FIELD_JOB_GROUP = 'group'
- FIELD_NOT_BEFORE = 'notBefore'
- FIELD_PRIORITY = 'priority'
- FIELD_REFERENCE = 'reference'
- FIELD_STATUS = 'status'
- TYPE_CAMEL = 'camel'
- For camelBacked input/output.
- TYPE_DASHED = 'dashed'
- For query string usage.
- TYPE_UNDERSCORED = 'underscored'
- For DB and form input/output.
Properties
- $_keyMap : array<string, array<string, string>>
- $group : string|null
- $notBefore : DateTime|string|int|null
- $priority : int|null
- $reference : string|null
- $status : string|null
Methods
- field() : string
- Lookup for dashed or underscored inflection of fields.
- fields() : array<string|int, string>
- fromArray() : $this
- getGroup() : string|null
- getGroupOrFail() : string
- getNotBefore() : DateTime|string|int|null
- getNotBeforeOrFail() : DateTime|string|int
- getPriority() : int|null
- getPriorityOrFail() : int
- getReference() : string|null
- getReferenceOrFail() : string
- getStatus() : string|null
- getStatusOrFail() : string
- hasGroup() : bool
- hasNotBefore() : bool
- hasPriority() : bool
- hasReference() : bool
- hasStatus() : bool
- setGroup() : $this
- setGroupOrFail() : $this
- setNotBefore() : $this
- setNotBeforeOrFail() : $this
- setPriority() : $this
- setPriorityOrFail() : $this
- setReference() : $this
- setReferenceOrFail() : $this
- setStatus() : $this
- setStatusOrFail() : $this
- toArray() : array<string, mixed>
- key() : string
- keyType() : string
Constants
FIELD_JOB_GROUP
public
string
FIELD_JOB_GROUP
= 'group'
FIELD_NOT_BEFORE
public
string
FIELD_NOT_BEFORE
= 'notBefore'
FIELD_PRIORITY
public
string
FIELD_PRIORITY
= 'priority'
FIELD_REFERENCE
public
string
FIELD_REFERENCE
= 'reference'
FIELD_STATUS
public
string
FIELD_STATUS
= 'status'
TYPE_CAMEL
For camelBacked input/output.
public
string
TYPE_CAMEL
= 'camel'
E.g. myFieldName
TYPE_DASHED
For query string usage.
public
string
TYPE_DASHED
= 'dashed'
E.g. my-field-name
TYPE_UNDERSCORED
For DB and form input/output.
public
string
TYPE_UNDERSCORED
= 'underscored'
E.g. my_field_name
Properties
$_keyMap
protected
array<string, array<string, string>>
$_keyMap
= [self::TYPE_CAMEL => ['priority' => 'priority', 'notbefore' => 'notBefore', 'jobGroup' => 'group', 'reference' => 'reference', 'status' => 'status'], self::TYPE_UNDERSCORED => ['priority' => 'priority', 'notbefore' => 'notBefore', 'job_group' => 'group', 'reference' => 'reference', 'status' => 'status'], self::TYPE_DASHED => ['priority' => 'priority', 'notbefore' => 'notBefore', 'job-group' => 'group', 'reference' => 'reference', 'status' => 'status']]
$group
protected
string|null
$group
$notBefore
protected
DateTime|string|int|null
$notBefore
$priority
protected
int|null
$priority
$reference
protected
string|null
$reference
$status
protected
string|null
$status
Methods
field()
Lookup for dashed or underscored inflection of fields.
public
field(string $name, string $type) : string
Parameters
- $name : string
- $type : string
-
Either dashed or underscored
Tags
Return values
stringfields()
public
fields() : array<string|int, string>
Return values
array<string|int, string>fromArray()
public
fromArray(array<string|int, mixed> $data[, string|null $type = null ]) : $this
Parameters
- $data : array<string|int, mixed>
- $type : string|null = null
Return values
$thisgetGroup()
public
getGroup() : string|null
Return values
string|nullgetGroupOrFail()
public
getGroupOrFail() : string
Tags
Return values
stringgetNotBefore()
public
getNotBefore() : DateTime|string|int|null
Return values
DateTime|string|int|nullgetNotBeforeOrFail()
public
getNotBeforeOrFail() : DateTime|string|int
Tags
Return values
DateTime|string|intgetPriority()
public
getPriority() : int|null
Return values
int|nullgetPriorityOrFail()
public
getPriorityOrFail() : int
Tags
Return values
intgetReference()
public
getReference() : string|null
Return values
string|nullgetReferenceOrFail()
public
getReferenceOrFail() : string
Tags
Return values
stringgetStatus()
public
getStatus() : string|null
Return values
string|nullgetStatusOrFail()
public
getStatusOrFail() : string
Tags
Return values
stringhasGroup()
public
hasGroup() : bool
Return values
boolhasNotBefore()
public
hasNotBefore() : bool
Return values
boolhasPriority()
public
hasPriority() : bool
Return values
boolhasReference()
public
hasReference() : bool
Return values
boolhasStatus()
public
hasStatus() : bool
Return values
boolsetGroup()
public
setGroup(string|null $group) : $this
Parameters
- $group : string|null
Return values
$thissetGroupOrFail()
public
setGroupOrFail(string $group) : $this
Parameters
- $group : string
Tags
Return values
$thissetNotBefore()
public
setNotBefore(DateTime|string|int|null $notBefore) : $this
Parameters
- $notBefore : DateTime|string|int|null
Return values
$thissetNotBeforeOrFail()
public
setNotBeforeOrFail(DateTime|string|int|null $notBefore) : $this
Parameters
- $notBefore : DateTime|string|int|null
Tags
Return values
$thissetPriority()
public
setPriority(int|null $priority) : $this
Parameters
- $priority : int|null
Return values
$thissetPriorityOrFail()
public
setPriorityOrFail(int $priority) : $this
Parameters
- $priority : int
Tags
Return values
$thissetReference()
public
setReference(string|null $reference) : $this
Parameters
- $reference : string|null
Return values
$thissetReferenceOrFail()
public
setReferenceOrFail(string $reference) : $this
Parameters
- $reference : string
Tags
Return values
$thissetStatus()
public
setStatus(string|null $status) : $this
Parameters
- $status : string|null
Return values
$thissetStatusOrFail()
public
setStatusOrFail(string $status) : $this
Parameters
- $status : string
Tags
Return values
$thistoArray()
public
toArray([string|null $type = null ]) : array<string, mixed>
Parameters
- $type : string|null = null
Return values
array<string, mixed>key()
protected
key(string $key, string $type) : string
Parameters
- $key : string
- $type : string
Tags
Return values
stringkeyType()
protected
keyType(string|null $type[, string|null $default = null ]) : string
Parameters
- $type : string|null
- $default : string|null = null