Documentation

Currency
in package

Class Currency

This class provides methods to manage currency-related operations, including retrieving, creating, and updating currency records.

Table of Contents

Properties

$mySql  : MySql

Methods

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

Properties

Methods

createByAdmin()

Create a new currency (admin).

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

Expects in $data:

  • currency_code (string, required)
  • currency_name (string, required)
  • currency_display (string|null)
  • reference_code (string, required)
  • sort_order (int|null)
  • status (int, required)
  • createdby (string, required)
  • modifiedby (string, required)
Parameters
$data : array<string, mixed>

getAll()

Get all currencies for 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 currency by code.

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

updateByCode()

Update currency by code (admin).

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

Expects in $data:

  • currency_code (string, required)
  • currency_name (string|null)
  • currency_display (string|null)
  • reference_code (string, required)
  • sort_order (int|null)
  • status (int|null)
  • modifiedby (string, required)
Parameters
$data : array<string, mixed>

        
On this page

Search results