Pizzeria
in package
implements
JsonSerializable
Entrypoint for this pizza ordering application.
This class provides an interface through which you can order pizza's and pasta's from Mario's Pizzeria.
We have:
- American pizzas
- And real (italian) pizzas
Tags
Interfaces, Classes and Traits
- JsonSerializable
Table of Contents
- jsonSerialize() : array<string|int, mixed>
- order() : bool
- doOrder() : bool
- Places an order for a pizza.
- doOldOrder() : false
Methods
jsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —order()
public
order(Pizza ...$pizzas) : bool
Parameters
- $pizzas : Pizza
Return values
bool —doOrder()
Places an order for a pizza.
protected
static doOrder(Pizza $pizza) : bool
This is an example of a protected function with the static modifier whose parameters' type and return type is determined by the DocBlock and no type hints are given in the method signature.
Parameters
- $pizza : Pizza
-
The specific pizza to place an order for.
Return values
bool —Whether the order succeeded
doOldOrder()
private
final doOldOrder() : false
Tags
Return values
false —Demonstrate that 'false' is a valid return type in an DocBlock to indicate it won't just return any boolean; it will always be false.