Usephul

Gauge
in package

FinalYes

Used to gauge whether given subject fits a list of callbacks.

Tags
template-covariant

Table of Contents

Properties

$subject  : mixed

Methods

__construct()  : mixed
is()  : TResult

Properties

$subject read-only

public mixed $subject

Methods

__construct()

public __construct(TSubject $subject) : mixed
Parameters
$subject : TSubject

The value to gauge.

is()

public is(callable(mixed $arg, mixed ...$args): TResult $callback, callable(mixed $arg, mixed ...$args): TResult ...$callbacks) : TResult
Parameters
$callback : callable(mixed $arg, mixed ...$args): TResult

A callback function. The first callback argument with a parameter type that fits subject will be called and its result returned.

$callbacks : callable(mixed $arg, mixed ...$args): TResult

Callback functions. The first callback function with a parameter type that fits subject will be called and its result returned.

Return values
TResult

The result of the first of the callbacks that fits subject.

On this page

Search results