Documentation

Pizzeria
in package
implements JsonSerializable

FinalYes

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
link
https://wwww.phpdoc.org
link

docs

since
3.0
since
3.1

Does extra stuff

Table of Contents

Interfaces

JsonSerializable

Methods

jsonSerialize()  : array<string|int, mixed>
order()  : bool
setBestPizzaEver()  : void
doOrder()  : bool
Places an order for a pizza.
doOldOrder()  : false

Methods

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

order()

public order(Pizza ...$pizzas) : bool
Parameters
$pizzas : Pizza
Return values
bool

setBestPizzaEver()

public setBestPizzaEver([Pizza|null $pizza = null ]) : void
Parameters
$pizza : Pizza|null = null

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.

Tags
uses
Pizza::getName()

used to create an order

Return values
bool

Whether the order succeeded

doOldOrder()

private final doOldOrder() : false

This ordering method should no longer be used; it will always fail.

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.


        
On this page

Search results