class CallbackFlushDiscoverer implements FlushDiscoverer (View source)

Handle a callable object as a discoverer

Properties

protected callable $callback

Callback incapsulating the discovery logic

Methods

public
__construct(callable $callback)

Construct the discoverer from a callback

public
null|bool
shouldFlush()

Check whether we have to flush manifest

Details

__construct(callable $callback)

Construct the discoverer from a callback

Parameters

callable $callback

returning FlushDiscoverer response or a timestamp

null|bool shouldFlush()

Check whether we have to flush manifest

The return value is either null or a bool

  • null means the discoverer does not override the default behaviour (other discoverers decision)
  • bool means the discoverer wants to force flush or prevent it (true or false respectively)

Return Value

null|bool

null if don't care or bool to force or prevent flush