RequestFlushDiscoverer
class RequestFlushDiscoverer implements FlushDiscoverer (View source)
The default flush discovery implementation
- if request has
flush
or URL isdev/build
- AND in CLI or DEV mode
- then flush
Properties
protected | string | $env | Environment type (dev, test or live) |
|
protected | HTTPRequest | $request | Active request instance (session is not initialized yet!) |
Methods
Details
__construct(HTTPRequest $request, string $env)
Initialize it with active Request and Kernel
protected null|bool
lookupRequest()
Checks whether the request contains any flush indicators
protected bool|null
isAllowed()
Checks for permission to flush
Startup flush through a request is only allowed to CLI or DEV modes for security reasons
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)