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.
Table of contents
Download abmmhasan/bucket
More information about abmmhasan/bucket
Files in abmmhasan/bucket
Download abmmhasan/bucket
More information about abmmhasan/bucket
Files in abmmhasan/bucket
Vendor abmmhasan
Package bucket
Short Description PHP data and configuration primitives: arrays, collections, dot paths, dotenv, hooks, and DTO hydration.
License MIT
Package bucket
Short Description PHP data and configuration primitives: arrays, collections, dot paths, dotenv, hooks, and DTO hydration.
License MIT
Please rate this library. Is it a good library?
Informations about the package bucket
ArrayKit
ArrayKit is a modern PHP 8.4+ 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
- Unified Facade (
ArrayKit) - Traits for DTO & Hooking
- Pipeline for Collection Ops
- LazyCollection for Generator-Based Flows
- ArrayShape Validation Helper
- Compiled Config + Lazy Namespace Cache
- Namespaced Helpers + Optional Globals
Modules
Array Helpers
| Helper | Description |
|---|---|
| ArraySingle | Helpers for single-dimensional arrays (set ops, mapWithKeys, countBy, min/max, paginate, duplicates, averages). |
| ArrayMulti | Helpers for multi-dimensional arrays (flatten, collapse, depth, keyBy/indexBy, firstWhere, recursive sort/filter). |
| DotNotation | Get/set/remove values using dot keys; wildcard support; escaped literal-dot paths; flatten & expand. |
| ArrayShape | Lightweight array-shape assertions for row validation (require). |
| BaseArrayHelper | Internal shared base for consistent API across helpers. |
| ArraySharedOps | Internal shared operations used by ArraySingle and ArrayMulti (each/every/partition/skip*). |
Config System
| Class | Description |
|---|---|
| Config | Dot-access configuration loader with explicit hook-aware variants (getWithHooks, setWithHooks, fillWithHooks) plus compiled cache export/load and read memoization. |
| LazyFileConfig | First-segment lazy loader (db.host loads db.php on demand) with namespace cache files for structural reads and a flat leaf-index cache for exact scalar lookups. |
| BaseConfigTrait | Shared config logic. |
Collections
| Class | Description |
|---|---|
| Collection | OOP array wrapper implementing ArrayAccess, IteratorAggregate, 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. |
| LazyCollection | Generator-backed lazy operations (mapLazy, filterLazy, chunkLazy, take, takeUntil). |
| BaseCollectionTrait | Shared collection behavior. |
Traits
| Trait | Description |
|---|---|
| HookTrait | Generic hook system for on-get/on-set callbacks. Used by Config, LazyFileConfig, and HookedCollection. |
| DTOTrait | Utility trait for DTO-like behavior: populate, extract, cast arrays/objects easily. |
Helper Functions
| Helper Surface | Description |
|---|---|
Infocyph\ArrayKit\* |
Namespaced helper functions (compare, array_get, array_set, collect, chain) autoloaded by default. |
functions.php |
Optional global helper variants (manual include when needed). |
➤ Facade
| Class | Description |
|---|---|
| ArrayKit | Single entry point for arrays, dot tools, config, and collections (single(), multi(), etc.). |
Requirements
- PHP 8.4 or higher
Installation
Quick Examples
One Facade Entry Point
Single-Dimensional Helpers
Multi-Dimensional Helpers
Dot Notation
Config Hooks (Explicit)
Hooked Collection
🔹 DTO Trait Example
Lazy + Shape + Cache
Behavior Notes
ArrayMulti::flatten($array, 0)keeps top-level values unchanged;1flattens one level;INFfully flattens.ArraySingle::avg(),sum(),isPositive(), andisNegative()only consider numeric values (non-numeric values are ignored).ArraySingle::paginate()requirespage >= 1andperPage >= 1(throwsInvalidArgumentExceptionotherwise).- Callback-based row helpers (
ArrayMulti::sortBy(),sum(),maxBy(),minBy()) support($row, $key). DotNotationtreats existingnullkeys/properties as present (does not fall back to defaults).DotNotation::hasWildcard(),paths(),matches(),rename(), andmove()are available for wildcard/path operations.- For untrusted/deep payloads, use bounded traversal variants:
DotNotation::getSafe(),ArrayMulti::depthGuarded(),flattenGuarded(), andsortRecursiveGuarded(). LazyFileConfignamespace cache writes one cache file per namespace plus a shared__flat.phpfile containing only final scalar/null leaf values for exact-key fast paths.
Security
Protected by PHPForge — an automated quality and security gate for PHP projects.
Made with ❤️ for the PHP community
MIT Licensed
Documentation • Security • Code of Conduct • Contributing • Report Bug • Request Feature
MIT Licensed
Documentation • Security • Code of Conduct • Contributing • Report Bug • Request Feature
All versions of bucket with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.4
ext-hash Version *
ext-hash Version *
The package abmmhasan/bucket contains the following files
Loading the files please wait ...