final class RouteLifetime (View source)

RouteLifetime to be associated with matched/resolved routes

RouteLifetime can be set by Route Part handlers via the ResolveResult/MatchResult return values The lifetime will be set for the corresponding cache entries. The lowest lifetime is used if multiple are defined.

Methods

static RouteLifetime
createUndefined()

Creates an empty instance without a specific lifetime

static RouteLifetime
createInfinite()

Creates an instance without an infinite lifetime

static RouteLifetime
createSeconds(int $value)

Creates an instance without lifetime specified in seconds

static RouteLifetime
fromInt(int $value)

Creates an instance with a specific lifetime

merge(RouteLifetime $lifetime)

Merges two instances of this class combining results by using the lowest lifetime while respecting the special meaning of 0 = infinite and null = undefined

bool
isUndefined()

No description

bool
isInfinite()

No description

int|null
getValue()

No description

Details

static RouteLifetime createUndefined()

Creates an empty instance without a specific lifetime

Return Value

RouteLifetime

static RouteLifetime createInfinite()

Creates an instance without an infinite lifetime

Return Value

RouteLifetime

static RouteLifetime createSeconds(int $value)

Creates an instance without lifetime specified in seconds

Parameters

int $value

Return Value

RouteLifetime

static RouteLifetime fromInt(int $value)

Creates an instance with a specific lifetime

Parameters

int $value

Lifetime value in s with 0 meaning infinite

Return Value

RouteLifetime

RouteLifetime merge(RouteLifetime $lifetime)

Merges two instances of this class combining results by using the lowest lifetime while respecting the special meaning of 0 = infinite and null = undefined

Parameters

RouteLifetime $lifetime

Return Value

RouteLifetime

bool isUndefined()

No description

Return Value

bool

bool isInfinite()

No description

Return Value

bool

int|null getValue()

No description

Return Value

int|null