Documentation

Person
in package

Class representing operations related to a person.

Table of Contents

Properties

$mySql  : MySql

Methods

__construct()  : mixed
createByAdmin()  : void
Create a person (admin).
getAll()  : array<int, array<string, mixed>>
Get all persons for the given statuses.
getByCode()  : array<string, mixed>
Get a person by code.
updateByCode()  : void
Update person by code (admin).

Properties

Methods

createByAdmin()

Create a person (admin).

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

Expects in $data:

  • person_code (string, required)
  • person_first_name (string|null)
  • person_last_name (string|null)
  • person_age (int|null)
  • person_gender (string|null)
  • person_email (string|null)
  • plant_department_code (string|null, FK by code)
  • sort_order (int|null)
  • status (int, default 1)
  • createdby (string, required)
  • modifiedby (string, required)
Parameters
$data : array<string, mixed>

getAll()

Get all persons 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 person by code.

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

updateByCode()

Update person by code (admin).

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

Expects in $data:

  • person_code (string, required)
  • person_first_name (string|null)
  • person_last_name (string|null)
  • person_age (int|null)
  • person_gender (string|null)
  • person_email (string|null)
  • plant_department_code (string|null, if omitted department is unchanged)
  • sort_order (int|null)
  • status (int|null)
  • modifiedby (string, required)
Parameters
$data : array<string, mixed>

        
On this page

Search results