PHP Class Ardent\Option

Inheritance: implements Countabl\Countable, implements IteratorAggregat\IteratorAggregate
Afficher le fichier Open project: morrisonlevi/ardent Class Usage Examples

Méthodes publiques

Méthode Description
count ( )
filter ( callable $f )
fromMaybeFalse ( $value )
fromMaybeNull ( $value )
fromPredicate ( callable $f, $value )
getIterator ( )
map ( callable $f )
match ( callable $ifSome, callable $ifNone )
none ( )
some ( $thing )

Private Methods

Méthode Description
__construct ( $has_value, $value )

Method Details

count() public méthode

public count ( )

filter() public méthode

public filter ( callable $f )
$f callable

fromMaybeFalse() public static méthode

public static fromMaybeFalse ( $value )

fromMaybeNull() public static méthode

public static fromMaybeNull ( $value )

fromPredicate() public static méthode

public static fromPredicate ( callable $f, $value )
$f callable

getIterator() public méthode

public getIterator ( )

map() public méthode

public map ( callable $f )
$f callable

match() public méthode

public match ( callable $ifSome, callable $ifNone )
$ifSome callable
$ifNone callable

none() public static méthode

public static none ( )

some() public static méthode

public static some ( $thing )