Documentation

Accident
in package

Class Accident

A class responsible for managing accident-related operations, including fetching accident details, saving accident records, and creating new accident entries with associated metadata.

Table of Contents

Properties

$kpi  : Kpi
$mySql  : MySql

Methods

__construct()  : mixed
create()  : int
Add an accident
getAccidentCode()  : string|null
getById()  : array<string|int, mixed>
getByKpiCode()  : array<string|int, mixed>
save()  : int|bool
update()  : void

Properties

Methods

create()

Add an accident

public create(array<string|int, mixed> $data) : int
Parameters
$data : array<string|int, mixed>
Tags
throws
Exception
Return values
int

getAccidentCode()

public getAccidentCode(int $accidentId) : string|null
Parameters
$accidentId : int
Return values
string|null

getById()

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

getByKpiCode()

public getByKpiCode(string $dataPointCode, string $kpiCode, string $plantCode, string $locationCode, string $date) : array<string|int, mixed>
Parameters
$dataPointCode : string
$kpiCode : string
$plantCode : string
$locationCode : string
$date : string
Return values
array<string|int, mixed>

save()

public save(array<string|int, mixed> $data) : int|bool
Parameters
$data : array<string|int, mixed>
Return values
int|bool

REMOVE THIS METHOD !!!!

update()

public update(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

        
On this page

Search results