Dog
in package
implements
IAnimal
A cute dog!
Tags
Table of Contents
Interfaces
- IAnimal
- An interface for the behaviors and properties of animals.
Properties
Methods
- __construct() : mixed
- getAge() : float
- age of dog in years
- getName() : string
- name of the animal, like 'Fluffy'
- getSound() : string
- the sound that the animal makes
- getType() : string
- type of the animal, like cat, alligator, tiger
Properties
$age
private
float
$age
$name
private
string
$name
Methods
__construct()
public
__construct(string $name, float $age) : mixed
Parameters
- $name : string
- $age : float
getAge()
age of dog in years
public
getAge() : float
Return values
floatgetName()
name of the animal, like 'Fluffy'
public
getName() : string
Return values
stringgetSound()
the sound that the animal makes
public
getSound() : string
Return values
stringgetType()
type of the animal, like cat, alligator, tiger
public
getType() : string