-
Notifications
You must be signed in to change notification settings - Fork 9
Pizza
Sakri Koskimies edited this page Jul 10, 2025
·
2 revisions
A pizza | pie's.
- Full name:
\PhpDocumentorMarkdown\Example\Pizza - Parent class:
\PhpDocumentorMarkdown\Example\AbstractProduct - This class implements:
\PhpDocumentorMarkdown\Example\ProductInterface,JsonSerializable
Product name.
private string $nameProduct price.
protected float $pricePizza base.
protected \PhpDocumentorMarkdown\Example\Pizza\Base|null $baseProperty base description
- See: \PhpDocumentorMarkdown\Example\ManyInterfaces
Constructor title
public __construct(string $name = '', float $price = 10.0, \PhpDocumentorMarkdown\Example\Pizza\Base|null $base = null): mixedConstructor description
- See: \PhpDocumentorMarkdown\Example\ManyInterfaces
- See: https://example.com
Parameters:
| Parameter | Type | Description |
|---|---|---|
$name |
string | Product name. |
$price |
float | Product price. |
$base |
\PhpDocumentorMarkdown\Example\Pizza\Base|null | Pizza's base. |
Get the name of the product.
public getName(): stringReturn Value:
The name of the product.
Get the price of the product.
public getPrice(): floatpublic jsonSerialize(): mixedGet the instance as an array.
public toArray(): arrayGet the tax rate for the product.
public getTaxRate(): floatWhether the object has been reviewed.
public isReviewed(): bool