Download the PHP package abmmhasan/bucket without Composer
On this page you can find all versions of the php package abmmhasan/bucket. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download abmmhasan/bucket
More information about abmmhasan/bucket
Files in abmmhasan/bucket
Package bucket
Short Description A Collection of useful PHP array functions.
License MIT
Informations about the package bucket
ArrayKit
ArrayKit is a modern PHP 8.2+ library for elegant, high-performance array manipulation, dot notation utilities, dynamic configuration, hookable collections, and more. From shallow single arrays to deeply nested data structures — ArrayKit provides a fluent, reliable toolkit for real-world PHP projects.
📦 Features at a Glance
✅ Single-Dimensional Helpers
✅ Multi-Dimensional Helpers
✅ Dot Notation Get/Set/Flatten
✅ Dynamic Config with Hooks
✅ Collection & Hooked Collection
✅ Traits for DTO & Hooking
✅ Pipeline for Collection Ops
✅ Global Helpers (functions.php
)
📚 Modules
➤ Array Helpers
Helper | Description |
---|---|
ArraySingle | Helpers for single-dimensional arrays (detect list/assoc, filter, paginate, duplicates, averages). |
ArrayMulti | Helpers for multi-dimensional arrays (flatten, collapse, depth, recursive sort, filter). |
DotNotation | Get/set/remove values using dot keys; flatten & expand nested arrays with dot keys. |
BaseArrayHelper | Internal shared base for consistent API across helpers. |
➤ Config System
Class | Description |
---|---|
Config | Immutable dot-access configuration loader. |
DynamicConfig | Extends Config with on-get/on-set hooks to transform values dynamically (e.g., encrypt/decrypt, auto-format). |
BaseConfigTrait | Shared config logic. |
➤ Collections
Class | Description |
---|---|
Collection | OOP array wrapper implementing ArrayAccess , Iterator , Countable , JsonSerializable . |
HookedCollection | Extends Collection with on-get/on-set hooks for real-time transformation of values. |
Pipeline | Functional-style pipeline for chaining operations on collections. |
BaseCollectionTrait | Shared collection behavior. |
➤ Traits
Trait | Description |
---|---|
HookTrait | Generic hook system for on-get/on-set callbacks. Used by DynamicConfig & HookedCollection . |
DTOTrait | Utility trait for DTO-like behavior: populate, extract, cast arrays/objects easily. |
➤ Global Helpers
File | Description |
---|---|
functions.php | Global shortcut functions for frequent array/config tasks. |
✅ Requirements
- PHP 8.2 or higher
⚡ Installation
🚀 Quick Examples
🔹 Single-Dimensional Helpers
🔹 Multi-Dimensional Helpers
🔹 Dot Notation
🔹 Dynamic Config with Hooks
🔹 Hooked Collection
🔹 DTO Trait Example
🤝 Support
Have a bug or feature idea? Please open an issue.
📄 License
Licensed under the MIT License — use it freely for personal or commercial projects. See LICENSE for details.