Support Utilities
Support Utilities
Zero ships a family of dependency-free helpers under Zero\Lib\Support. Each one is documented on its own page with a runnable example for every method.
| Topic | Class / namespace | Doc |
|---|---|---|
| Strings | Zero\Lib\Support\Str | str.md |
| Fluent strings | Zero\Lib\Support\Stringable (via Str::of() / str()) | stringable.md |
| Arrays | Zero\Lib\Support\Arr | arr.md |
| Collections | Zero\Lib\Support\Collection (via collect()) | collection.md |
| Numbers | Zero\Lib\Support\Number | number.md |
| Dates | Zero\Lib\Support\Date / DateTime | ../date.md |
| HTTP client | Zero\Lib\Http | http.md |
| SOAP client | Http::soap() | soap.md |
| Filesystem | Zero\Lib\Filesystem\File | filesystem.md |
| Global helpers | core/libraries/Support/Helper.php | ../helpers.md |
Code organization
Str, Arr, and Collection are composed of topical traits under core/libraries/Support/Concerns/<Class>/<Topic>.php. The public class names and FQCNs are unchanged — use Zero\Lib\Support\Str; etc. work exactly as before.
The trait split mirrors the doc topic split:
Str→ Transforms, Search, Extraction, Replacement, Composition, Identity, Encoding, Pluralization, Casing, Padding, Random, FluentArr→ Access, Iteration, Shape, Sorting, TestsCollection→ Building, Conversion, Iteration, Filtering, Querying, Mutation, Slicing, Reshaping, Set Operations, Sorting, Aggregates, Conditional