Documentation

RecordNumber extends RecordNumber
in package

Class RecordNumber.

Tags
codeCoverageIgnore

Table of Contents

$currentDateIndex  : int
$dates  : array<string|int, mixed>
$value  : mixed
$instanceCache  : array<string|int, RecordNumber>
Instance cache by module id.
$sequenceNumberFieldCache  : array<string|int, mixed>
Sequence number field cache by module id.
__construct()  : mixed
Constructor.
cleanSequenceNumberFieldCache()  : void
Clean sequence number field cache.
date()  : false|string
Date method mock for testing purposes.
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).
getIncrementNumber()  : string
Function to get the next nuber of record.
getInstance()  : RecordNumber
Function to get instance.
getKeys()  : array<string|int, string>
Function to get keys.
getRecord()  : mixed
Returns model of record.
getRelatedValue()  : string
gets related value.
getSequenceNumber()  : mixed
Get sequence number that should be saved.
getSequenceNumberField()  : array<string|int, string>|bool
Get sequence number field.
getSequenceNumberFieldName()  : string|bool
Get sequence number field name.
has()  : bool
Function to check if the key exists.
isEmpty()  : bool
Function to check if the key is empty.
isNewSequence()  : bool
Function to check if record need a new number of sequence.
parseNumber()  : string
Parse number based on postfix and prefix.
remove()  : mixed
Function to remove the value.
save()  : int
Saves configuration.
set()  : $this
Function to set the value for a given key.
setData()  : $this
Function to set all the values.
setNumberSequence()  : mixed
Sets number of sequence.
setRecord()  : $this
Sets model of record.
updateNumberSequence()  : bool|int
Update number sequence.
updateRecords()  : array<string|int, mixed>
Updates missing numbers of records.
getCurrentSequenceNumber()  : int
Function to get current sequence number.
getPicklistName()  : string
Returns name of picklist. Postfix or prefix can contains name of picklist.
getPicklistValue()  : string
Returns prefix of picklist.

Properties

$dates

public static array<string|int, mixed> $dates = ['2015-01-01', '2015-03-03', '2015-03-03', '2015-03-03', '2015-03-04', '2015-03-04', '2015-03-05', '2015-11-09', '2015-11-10', '2015-11-11', '2015-11-28', '2016-11-29', '2017-03-15', '2017-03-18', '2017-07-19', '2018-01-01', '2018-01-02', '2018-01-02', '2018-02-03', '2018-05-05']

$value

protected mixed $value

$sequenceNumberFieldCache

Sequence number field cache by module id.

private static array<string|int, mixed> $sequenceNumberFieldCache = []

Methods

__construct()

Constructor.

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

cleanSequenceNumberFieldCache()

Clean sequence number field cache.

public static cleanSequenceNumberFieldCache(int|null $tabId) : void
Parameters
$tabId : int|null
Return values
void

date()

Date method mock for testing purposes.

public static date(string $format[, int|null $time = null ]) : false|string
Parameters
$format : string
$time : int|null = null
Return values
false|string

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

getIncrementNumber()

Function to get the next nuber of record.

public getIncrementNumber() : string
Return values
string

getKeys()

Function to get keys.

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

getRecord()

Returns model of record.

public getRecord() : mixed
Return values
mixed

getRelatedValue()

gets related value.

public getRelatedValue([bool $reload = false ]) : string
Parameters
$reload : bool = false
Return values
string

getSequenceNumber()

Get sequence number that should be saved.

public static getSequenceNumber(string $resetSequence) : mixed
Parameters
$resetSequence : string

one character

Return values
mixed

getSequenceNumberField()

Get sequence number field.

public static getSequenceNumberField(int $tabId) : array<string|int, string>|bool
Parameters
$tabId : int
Return values
array<string|int, string>|bool

getSequenceNumberFieldName()

Get sequence number field name.

public static getSequenceNumberFieldName(int $tabId) : string|bool
Parameters
$tabId : int
Return values
string|bool

has()

Function to check if the key exists.

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

isEmpty()

Function to check if the key is empty.

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

isNewSequence()

Function to check if record need a new number of sequence.

public isNewSequence() : bool
Return values
bool

parseNumber()

Parse number based on postfix and prefix.

public parseNumber(int $seq) : string
Parameters
$seq : int
Return values
string

remove()

Function to remove the value.

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

save()

Saves configuration.

public save() : int
Tags
throws
Exception
Return values
int

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

setNumberSequence()

Sets number of sequence.

public setNumberSequence(int $reqNo, string $actualSequence) : mixed
Parameters
$reqNo : int
$actualSequence : string
Tags
throws
Exception
Return values
mixed

updateNumberSequence()

Update number sequence.

public updateNumberSequence(int $reqNo, string $prefix) : bool|int
Parameters
$reqNo : int
$prefix : string
Return values
bool|int

updateRecords()

Updates missing numbers of records.

public updateRecords() : array<string|int, mixed>
Tags
throws
Exception
Return values
array<string|int, mixed>

getCurrentSequenceNumber()

Function to get current sequence number.

private getCurrentSequenceNumber() : int
Return values
int

getPicklistName()

Returns name of picklist. Postfix or prefix can contains name of picklist.

private getPicklistName() : string
Return values
string

getPicklistValue()

Returns prefix of picklist.

private getPicklistValue(string $picklistName[, string|null $recordValue = null ]) : string
Parameters
$picklistName : string
$recordValue : string|null = null
Return values
string

Search results