DryRun
MMO\core\helpers · 1 symbol · generated 30 Nov 2026
DryRun
DryRun.php:27A request made as a dry run: it runs as it would, answers what it would, and changes nothing. Asked by the header
- Namespace
MMO\core\helpers- See
HEADER(X-MMO-Dry-Run: 1), for the whole request (Application::handle).
Index
| HEADER | The request's header asking a dry run, 1 | |
| active static | ||
| entities static | ||
| report static | ||
| DescribeEntity($entity) static | ||
| Guard($origin, $what, $context) static | Stop a write that cannot be simulated, when a dry run is on. | |
| IsActive() static | ||
| Outside($fn) static | Run $fn as outside the dry run: for a security record only -- a session's token refreshed, which the request needs to authenticate -- never for the data. | |
| Plain($value) static | ||
| Record($kind, $what) static | Record what would have been done, when a dry run is on (nothing otherwise). | |
| RecordEntity($entity) static | Record an entity a commit would have saved (Commit::dispatch), to say it and forget it. | |
| Report() static | ||
| Start() static | Start a dry run: until Stop, nothing is written. | |
| Stop() static | End the dry run. |
Constants1
HEADER
The request's header asking a dry run, 1
Properties3
active
static- Type
- bool
entities
static- Type
- array
report
static- Type
- array
Methods10
DescribeEntity($entity)
staticDryRun.php:130Guard($origin, $what, $context)
staticDryRun.php:121Stop a write that cannot be simulated, when a dry run is on.
IsActive()
staticDryRun.php:96| returns | bool | whether the current request is a dry run |
Outside($fn)
staticDryRun.php:88Run $fn as outside the dry run: for a security record only -- a session's token refreshed, which the request needs to authenticate -- never for the data. Its commit saves every entity pending then: call it before the request's work.
Plain($value)
staticDryRun.php:147Record($kind, $what)
staticDryRun.php:110Record what would have been done, when a dry run is on (nothing otherwise).
RecordEntity($entity)
staticDryRun.php:73Record an entity a commit would have saved (Commit::dispatch), to say it and forget it.
Report()
staticDryRun.php:101| returns | array | list<array<string, mixed>>> what was recorded so far |
Start()
staticDryRun.php:40Start a dry run: until Stop, nothing is written.
| returns | void |
Stop()
staticDryRun.php:50End the dry run.
| returns | array | list<array<string, mixed>>> what it recorded |