Kitchen Sink
This section is the full method tour.
Use it when you want every public Result method and the retry builder covered in one place, grouped by behavior. Start with the quick map, then open the category pages for the full explanation of each function.
php
use Maxiviper117\ResultFlow\Result;
$result = Result::ok($input, ['request_id' => 'r-1'])
->ensure(fn (array $input) => isset($input['email']), 'Email is required')
->then(fn (array $input) => Result::ok($input, ['stage' => 'validated']))
->otherwise(fn ($error, array $meta) => Result::fail([
'message' => (string) $error,
'request_id' => $meta['request_id'] ?? null,
], $meta));Quick Map
| Group | Page |
|---|---|
| Constructors and resource safety | Construction and entry points |
| Collection operations | Collections |
| Branch state and metadata | Branch state and metadata |
| Chaining and recovery | Chaining and recovery |
| Finalization and output | Finalization and output |
| Retry builder | Retry builder |
How To Use This Section
- Open the category that matches the behavior you care about.
- Read the short summary first.
- Scan the function-by-function subsections.
- Jump back to the narrower reference pages if you only need a quick lookup.
Why This Exists
The reference pages are organized for lookup. This section is organized for comprehension.
The difference is deliberate:
- reference pages keep signatures and exact behavior easy to scan
- kitchen sink pages explain every public function in a single narrative section, grouped by behavior