Documentation

Fruit extends Food

Fruitクラス

Tags
version
1.0.0
author

y.hirano

link
https://codelikes.com/phpDocumentor

Table of Contents

$color  : string
$name  : string
$shape  : int
$shapeText  : mixed
$var array $shapeText
$size  : int
$taste  : string
getColor()  : string
色の値を取得
getName()  : string
名前の値を取得
getShape()  : string
形状の値を取得
getSize()  : int
サイズの値を取得
getTaste()  : string
味の値を取得
output()  : void
fruitの情報出力
setColor()  : void
色の値を設定
setName()  : void
名前の値を設定
setShape()  : void
形状の値を設定
setSize()  : void
サイズの値を設定
setTaste()  : void
味の値を設定

Properties

$color

private string $color

$name

private string $name

$shapeText

$var array $shapeText

private mixed $shapeText = [1 => '丸', 2 => '平たい', 3 => '三角', 4 => '四角']

$taste

private string $taste

Methods

getColor()

色の値を取得

public getColor() : string
Return values
string

getName()

名前の値を取得

public getName() : string
Return values
string

getShape()

形状の値を取得

public getShape() : string
Return values
string

getSize()

サイズの値を取得

public getSize() : int
Return values
int

getTaste()

味の値を取得

public getTaste() : string
Return values
string

output()

fruitの情報出力

public output() : void
Return values
void

setColor()

色の値を設定

public setColor(string $color) : void
Parameters
$color : string
Tags
example

カラーコードで設定

Return values
void

setName()

名前の値を設定

public setName(string $name) : void
Parameters
$name : string
Return values
void

setShape()

形状の値を設定

public setShape(int $shape) : void
Parameters
$shape : int
Return values
void

setSize()

サイズの値を設定

public setSize(int $size) : void
Parameters
$size : int
Return values
void

setTaste()

味の値を設定

public setTaste(string $taste) : void
Parameters
$taste : string
Tags
example

文字列で指定する

Return values
void

Search results