KMP PHP API Reference

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']]

$notBefore

protected DateTime|string|int|null $notBefore

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
throws
InvalidArgumentException
Return values
string

fields()

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
$this

getGroup()

public getGroup() : string|null
Return values
string|null

getGroupOrFail()

public getGroupOrFail() : string
Tags
throws
RuntimeException

If value is not set.

Return values
string

getNotBefore()

public getNotBefore() : DateTime|string|int|null
Return values
DateTime|string|int|null

getNotBeforeOrFail()

public getNotBeforeOrFail() : DateTime|string|int
Tags
throws
RuntimeException

If value is not set.

Return values
DateTime|string|int

getPriority()

public getPriority() : int|null
Return values
int|null

getPriorityOrFail()

public getPriorityOrFail() : int
Tags
throws
RuntimeException

If value is not set.

Return values
int

getReference()

public getReference() : string|null
Return values
string|null

getReferenceOrFail()

public getReferenceOrFail() : string
Tags
throws
RuntimeException

If value is not set.

Return values
string

getStatus()

public getStatus() : string|null
Return values
string|null

getStatusOrFail()

public getStatusOrFail() : string
Tags
throws
RuntimeException

If value is not set.

Return values
string

hasGroup()

public hasGroup() : bool
Return values
bool

hasNotBefore()

public hasNotBefore() : bool
Return values
bool

hasPriority()

public hasPriority() : bool
Return values
bool

hasReference()

public hasReference() : bool
Return values
bool

hasStatus()

public hasStatus() : bool
Return values
bool

setGroup()

public setGroup(string|null $group) : $this
Parameters
$group : string|null
Return values
$this

setGroupOrFail()

public setGroupOrFail(string $group) : $this
Parameters
$group : string
Tags
throws
RuntimeException

If value is not present.

Return values
$this

setNotBefore()

public setNotBefore(DateTime|string|int|null $notBefore) : $this
Parameters
$notBefore : DateTime|string|int|null
Return values
$this

setNotBeforeOrFail()

public setNotBeforeOrFail(DateTime|string|int|null $notBefore) : $this
Parameters
$notBefore : DateTime|string|int|null
Tags
throws
RuntimeException

If value is not present.

Return values
$this

setPriority()

public setPriority(int|null $priority) : $this
Parameters
$priority : int|null
Return values
$this

setPriorityOrFail()

public setPriorityOrFail(int $priority) : $this
Parameters
$priority : int
Tags
throws
RuntimeException

If value is not present.

Return values
$this

setReference()

public setReference(string|null $reference) : $this
Parameters
$reference : string|null
Return values
$this

setReferenceOrFail()

public setReferenceOrFail(string $reference) : $this
Parameters
$reference : string
Tags
throws
RuntimeException

If value is not present.

Return values
$this

setStatus()

public setStatus(string|null $status) : $this
Parameters
$status : string|null
Return values
$this

setStatusOrFail()

public setStatusOrFail(string $status) : $this
Parameters
$status : string
Tags
throws
RuntimeException

If value is not present.

Return values
$this

toArray()

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
throws
InvalidArgumentException
Return values
string

keyType()

protected keyType(string|null $type[, string|null $default = null ]) : string
Parameters
$type : string|null
$default : string|null = null
Return values
string

        
On this page

Search results