Documentation

CodeRange
in package

Class CodeRange

This class manages database interactions for the code_range table.

Table of Contents

Properties

$mySql  : MySql

Methods

__construct()  : mixed
createByAdmin()  : void
Create a new code_range (admin).
getAll()  : array<int, array<string, mixed>>
Get all code_range rows for the given statuses.
getByCode()  : array<string, mixed>
Get a single code_range row by table name and type.
updateByCode()  : void
Update an existing code_range by table name and type (admin).

Properties

Methods

createByAdmin()

Create a new code_range (admin).

public createByAdmin(array<string, mixed> $data) : void

Expects in $data:

  • code_range_table_name (string, required)
  • code_range_type (string, required)
  • code_range_prefix (string|null)
  • code_range_format (string|null)
  • code_range_logic (string|null)
  • code_range_comment (string|null)
  • sort_order (int|null)
  • status (int, default 1)
  • createdby (string, required)
  • modifiedby (string, required)
Parameters
$data : array<string, mixed>

getAll()

Get all code_range rows for the given statuses.

public getAll(array<string|int, int> $statuses) : array<int, array<string, mixed>>
Parameters
$statuses : array<string|int, int>
Return values
array<int, array<string, mixed>>

getByCode()

Get a single code_range row by table name and type.

public getByCode(string $tableName, string $type) : array<string, mixed>
Parameters
$tableName : string
$type : string
Return values
array<string, mixed>

updateByCode()

Update an existing code_range by table name and type (admin).

public updateByCode(array<string, mixed> $data) : void

Expects in $data:

  • code_range_table_name (string, required)
  • code_range_type (string, required)
  • code_range_prefix (string|null)
  • code_range_format (string|null)
  • code_range_logic (string|null)
  • code_range_comment (string|null)
  • sort_order (int|null)
  • status (int|null)
  • modifiedby (string, required)
Parameters
$data : array<string, mixed>

        
On this page

Search results