class HigherOrderWhenProxy (View source)

Properties

protected mixed $target

The target being conditionally operated on.

protected bool $condition

The condition for proxying.

protected bool $hasCondition

Indicates whether the proxy has a condition.

protected bool $negateConditionOnCapture

Determine whether the condition should be negated.

Methods

void
__construct(mixed $target)

Create a new proxy instance.

$this
condition(bool $condition)

Set the condition on the proxy.

$this
negateConditionOnCapture()

Indicate that the condition should be negated.

mixed
__get(string $key)

Proxy accessing an attribute onto the target.

mixed
__call(string $method, array $parameters)

Proxy a method call on the target.

Details

void __construct(mixed $target)

Create a new proxy instance.

Parameters

mixed $target

Return Value

void

$this condition(bool $condition)

Set the condition on the proxy.

Parameters

bool $condition

Return Value

$this

$this negateConditionOnCapture()

Indicate that the condition should be negated.

Return Value

$this

mixed __get(string $key)

Proxy accessing an attribute onto the target.

Parameters

string $key

Return Value

mixed

mixed __call(string $method, array $parameters)

Proxy a method call on the target.

Parameters

string $method
array $parameters

Return Value

mixed