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

Pizza

A pizza | pie's.


Properties

name

Product name.

private string $name

price

Product price.

protected float $price

base

Pizza base.

protected \PhpDocumentorMarkdown\Example\Pizza\Base|null $base

Property base description

  • See: \PhpDocumentorMarkdown\Example\ManyInterfaces

Methods

__construct

Constructor title

public __construct(string $name = '', float $price = 10.0, \PhpDocumentorMarkdown\Example\Pizza\Base|null $base = null): mixed

Constructor description

Parameters:

Parameter Type Description
$name string Product name.
$price float Product price.
$base \PhpDocumentorMarkdown\Example\Pizza\Base|null Pizza's base.

getName

Get the name of the product.

public getName(): string

Return Value:

The name of the product.


getPrice

Get the price of the product.

public getPrice(): float

jsonSerialize

public jsonSerialize(): mixed

toArray

Get the instance as an array.

public toArray(): array

Inherited methods

getTaxRate

Get the tax rate for the product.

public getTaxRate(): float

isReviewed

Whether the object has been reviewed.

public isReviewed(): bool

Clone this wiki locally