Pizza
extends Pizza
in package
Uses
ExampleNestedTrait
Pizza base class
Table of Contents
- DELIVERY = 'delivery'
- PACKAGING = 'box'
- The packaging method used to transport the pizza.
- PICKUP = 'pickup'
- $legacy : mixed
- $size : int
- The size of the pizza in centimeters, defaults to 20cm.
- $deliveryMethod : string
- $packaging : string
- $instance : static
- $sauce : Style
- $style : Style
- $toppings : Style
- addTopping() : mixed
- createInstance() : void
- Creates a new instance of a Pizza.
- getInstance() : self
- getPrice() : mixed
- setSauce() : mixed
- setSize() : mixed
- __construct() : mixed
- exampleTraitMethod() : mixed
Constants
DELIVERY
public
string
DELIVERY
= 'delivery'
DELIVERY designates that the delivery method is to deliver the pizza to the customer.
PACKAGING
The packaging method used to transport the pizza.
public
mixed
PACKAGING
= 'box'
PICKUP
public
string
PICKUP
= 'pickup'
PICKUP designates that the delivery method is that the customer picks the pizza up.
Properties
$legacy
public
mixed
$legacy
$size
The size of the pizza in centimeters, defaults to 20cm.
public
int
$size
= LuigiPizzaSIZE_20CM
$deliveryMethod
protected
string
$deliveryMethod
Is the customer picking this pizza up or must it be delivered?
$packaging
protected
string
$packaging
= self::PACKAGING
The type of packaging for this Pizza
$instance
private
static static
$instance
contains the active instance for this Pizza.
$sauce
private
Style
$sauce
$style
private
Style
$style
$toppings
private
Style
$toppings
Methods
addTopping()
public
final addTopping(Topping $topping) : mixed
Parameters
- $topping : Topping
Return values
mixed —createInstance()
Creates a new instance of a Pizza.
public
static createInstance(Style $style) : void
This method can be used to instantiate a new object of this class which can then be retrieved using self::getInstance().
Parameters
- $style : Style
Tags
Return values
void —getInstance()
public
static getInstance() : self
Return values
self —getPrice()
public
getPrice() : mixed
Return values
mixed —setSauce()
public
final setSauce(Sauce $sauce) : mixed
Parameters
- $sauce : Sauce
Return values
mixed —setSize()
public
setSize([mixed &$size = LuigiPizzaSIZE_20CM ]) : mixed
Parameters
- $size : mixed = LuigiPizzaSIZE_20CM
Return values
mixed —__construct()
private
__construct(Style $style) : mixed
Parameters
- $style : Style
Return values
mixed —exampleTraitMethod()
private
exampleTraitMethod() : mixed