scalikephp

OptionBuilder

Option building functions.

Table of Contents

from()  : Option
Returns an Option of the value.
fromArray()  : Option
Returns an Option of the array element.
none()  : None
Returns the None instance.
some()  : Some
Returns a Some of the value.

Methods

from()

Returns an Option of the value.

public final static from(mixed $value[, mixed $none = null ]) : Option
Parameters
$value : mixed
$none : mixed = null
Return values
Option

fromArray()

Returns an Option of the array element.

public final static fromArray(array<string|int, mixed>|ArrayAccess $array, int|string $key[, mixed $none = null ]) : Option
Parameters
$array : array<string|int, mixed>|ArrayAccess
$key : int|string
$none : mixed = null
Return values
Option

some()

Returns a Some of the value.

public final static some(mixed $value) : Some
Parameters
$value : mixed
Return values
Some

Search results