Menu

## Conditionable

Conditionable.php : 9

### Table of Contents

#### Methods

unless() : $this|TUnlessReturnType
  Apply the callback if the given "value" is (or resolves to) falsy.
when() : $this|TWhenReturnType
  Apply the callback if the given "value" is (or resolves to) truthy.

### Methods

#### unless()

Conditionable.php : 54

Apply the callback if the given "value" is (or resolves to) falsy.

`public unless([callable($this): TUnlessParameter|null $value = null ][, callable($this, TUnlessParameter): TUnlessReturnType|null $callback = null ][, callable($this, TUnlessParameter): TUnlessReturnType|null $default = null ]) : $this|TUnlessReturnType`

##### Parameters

$value : callable($this): TUnlessParameter|null = null
$callback : callable($this, TUnlessParameter): TUnlessReturnType|null = null
$default : callable($this, TUnlessParameter): TUnlessReturnType|null = null

##### Tags

template

  TUnlessParameter

template

  TUnlessReturnType

##### Return values

$this|TUnlessReturnType

#### when()

Conditionable.php : 22

Apply the callback if the given "value" is (or resolves to) truthy.

`public when([callable($this): TWhenParameter|null $value = null ][, callable($this, TWhenParameter): TWhenReturnType|null $callback = null ][, callable($this, TWhenParameter): TWhenReturnType|null $default = null ]) : $this|TWhenReturnType`

##### Parameters

$value : callable($this): TWhenParameter|null = null
$callback : callable($this, TWhenParameter): TWhenReturnType|null = null
$default : callable($this, TWhenParameter): TWhenReturnType|null = null

##### Tags

template

  TWhenParameter

template

  TWhenReturnType

##### Return values

$this|TWhenReturnType

## Search results