charcoal-dev / vectors
Vectors library for N-dim arrays
Requires
- php: ^8.3
- charcoal-dev/contracts: ^0.1.14
README
Vectors is a lightweight set of typed collection utilities for PHP that make working with strings, tokens, enums, and exceptions concise and safe. It provides purpose-built vector classes with fluent APIs for appending values, normalizing input, and enforcing uniqueness, plus consistent array accessors for easy interoperability. Token-focused vectors help you parse and manage delimited string tokens, while enum-aware vectors can organize cases, names, and values with predictable sorting. Provider interfaces let your domain objects expose their data as vectors directly, keeping collection logic centralized and reusable. Use it to tame ad‑hoc arrays into explicit, self-documenting structures that are straightforward to validate, transform, and pass around.
For detailed information, guidance, and setup instructions regarding this library, please refer to our official documentation website: