Skip to content

ProductInterface

Sakri Koskimies edited this page Jul 10, 2025 · 2 revisions

ProductInterface

Interface for a product.


Methods

__construct

public __construct(string $name, float $price): mixed

Parameters:

Parameter Type Description
$name string Product name.
$price float Product price.

getName

Get the name of the product.

public getName(): string

getPrice

Get the price of the product.

public getPrice(): float

getTaxRate

Get the tax rate for this product.

public getTaxRate(): float

Inherited methods

toArray

Get the instance as an array.

public toArray(): array

Clone this wiki locally