diff --git a/.gitignore b/.gitignore
index fc61b884..25d0a69b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,10 +12,10 @@ Thumbs.db
# Composer dependencies resolver
composer.lock
-# PHAR artifacts
-/phar/**
-!/phar/*.phar
-!/phar/*.phar.pubkey
+# Distribution artifacts
+/dist/**
+!/dist/*.phar
+!/dist/*.phar.pubkey
# Storage folder for runtime-generated files
/storage/
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5fa61a53..727024b9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,38 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [v0.3.3](https://github.com/The-FireHub-Project/Core-Foundation/compare/v0.3.2...v0.3.3) – 2026-05-28
+
+### Added
+- Add `Map` and `Associative` data structures with advanced capabilities (issue: [#11](https://github.com/The-FireHub-Project/Core-Foundation/issues/11), pr: [#13](https://github.com/The-FireHub-Project/Core-Foundation/pull/13), commit: [`15b5c3a`](https://github.com/The-FireHub-Project/Core-Foundation/commit/15b5c3a))
+- Add `crc32` checksum calculation to `StrSB` with unit test coverage (issue: [#11](https://github.com/The-FireHub-Project/Core-Foundation/issues/11), pr: [#13](https://github.com/The-FireHub-Project/Core-Foundation/pull/13), commit: [`15b5c3a`](https://github.com/The-FireHub-Project/Core-Foundation/commit/15b5c3a))
+
+### Changed
+- Replace `ArrMapStorage` with new `HashStorage` abstraction; introduce pluggable `HashEngine` and remove outdated array-based initializers (issue: [#11](https://github.com/The-FireHub-Project/Core-Foundation/issues/11), pr: [#13](https://github.com/The-FireHub-Project/Core-Foundation/pull/13), commit: [`b430fe0`](https://github.com/The-FireHub-Project/Core-Foundation/commit/b430fe0))
+
+### Fixed
+- Replace `addFirst` with `addLast` in `Vector` initialization logic (issue: [#11](https://github.com/The-FireHub-Project/Core-Foundation/issues/11), pr: [#13](https://github.com/The-FireHub-Project/Core-Foundation/pull/13), commit: [`377be90`](https://github.com/The-FireHub-Project/Core-Foundation/commit/377be90))
+
+## [v0.3.2](https://github.com/The-FireHub-Project/Core-Foundation/compare/v0.3.1...v0.3.2) – 2026-05-27
+
+### Added
+- Introduce Data Transfer Object and Rehydratable capabilities for structured data management (issue: [#11](https://github.com/The-FireHub-Project/Core-Foundation/issues/11), pr: [#13](https://github.com/The-FireHub-Project/Core-Foundation/pull/13), commit: [`1117c8b`](https://github.com/The-FireHub-Project/Core-Foundation/commit/1117c8b))
+- Add Rebuildable and Convertible capabilities to data structures (issue: [#11](https://github.com/The-FireHub-Project/Core-Foundation/issues/11), pr: [#13](https://github.com/The-FireHub-Project/Core-Foundation/pull/13), commit: [`cc098de`](https://github.com/The-FireHub-Project/Core-Foundation/commit/cc098de))
+- Enhance `Vector` capabilities with advanced index-based operations and PHP 8.1 support (issue: [#11](https://github.com/The-FireHub-Project/Core-Foundation/issues/11), pr: [#13](https://github.com/The-FireHub-Project/Core-Foundation/pull/13), commit: [`a8db5c5`](https://github.com/The-FireHub-Project/Core-Foundation/commit/a8db5c5))
+
+### Fixed
+- Correct documentation and improve mutation outcome handling in BackInsertion and ArrListStorage (issue: [#11](https://github.com/The-FireHub-Project/Core-Foundation/issues/11), pr: [#13](https://github.com/The-FireHub-Project/Core-Foundation/pull/13), commit: [`16353ce`](https://github.com/The-FireHub-Project/Core-Foundation/commit/16353ce))
+
+## [v0.3.1](https://github.com/The-FireHub-Project/Core-Foundation/compare/v0.3.0...v0.3.1) – 2026-05-25
+
+### Added
+- Introduce an extensible data structure framework with granular capabilities and runtime state management (issue: [#11](https://github.com/The-FireHub-Project/Core-Foundation/issues/11), pr: [#13](https://github.com/The-FireHub-Project/Core-Foundation/pull/13), commit: [`0400d2e`](https://github.com/The-FireHub-Project/Core-Foundation/commit/0400d2e))
+
+## [v0.3.0](https://github.com/The-FireHub-Project/Core-Foundation/compare/v0.2.0...v0.3.0) – 2026-05-19
+
+### Added
+- Redesign and expand data structure capabilities with flexible abstraction contracts (issue: [#11](https://github.com/The-FireHub-Project/Core-Foundation/issues/11), pr: [#13](https://github.com/The-FireHub-Project/Core-Foundation/pull/13), commit: [`ce61610`](https://github.com/The-FireHub-Project/Core-Foundation/commit/ce61610))
+
## [v0.2.0](https://github.com/The-FireHub-Project/Core-Foundation/compare/v0.1.1...v0.2.0) – 2026-03-23
### Added
diff --git a/CITATION.cff b/CITATION.cff
index 250f3dce..5522c44b 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -4,8 +4,8 @@ title: The FireHub Project - Core Foundation
abstract: The essential PHP core for clean, domain-driven architecture.
type: software
license: Apache-2.0
-version: v0.2.0
-date-released: 2026-03-23
+version: v0.3.1
+date-released: 2026-05-25
url: "https://the-firehub-project.github.io/core-foundation"
repository-code: "https://github.com/The-FireHub-Project/Core-Foundation"
diff --git a/README.md b/README.md
index c372e95a..6dd695a0 100644
--- a/README.md
+++ b/README.md
@@ -3,137 +3,140 @@
-## FireHub Core Foundation — Develop Branch
+## High-level API for Low-level proxy – Development Branch
-
+
+
+
+
+
+
+
+
-
+
-
+
-⚠️ **This is the `develop` branch**
+### Pull request
-- Unstable
-- APIs may change without notice
-- Not intended for production use
-
-## Branch Purpose
-
-The `develop` branch is the **primary integration branch** for all ongoing development.
-
-It serves as the staging area where:
-- Feature branches are merged
-- Bug fixes are integrated
-- Experimental work is stabilized
-- Code is prepared for upcoming releases
-
-All **release branches** are created **from `develop`**.
-
-## Stability Guarantee
+
+
+
+
+
+
+
+
+
+
-❌ No backward compatibility guarantee
-❌ APIs may change without notice
-❌ Behavior may be incomplete or inconsistent
-❌ Breaking changes are expected
+### Milestone
-This branch is intended **only for contributors and advanced testers**.
+
+
+
+
-## Versioning Strategy
+This branch contains the initial development of foundational internal utilities for **FireHub Core Foundation**.
-FireHub follows **Semantic Versioning (SemVer)**:
+The purpose of this branch is to establish a stable, consistent, and reusable internal layer that standardizes access to core PHP functionality and provides safe, predictable building blocks for higher-level components across the FireHub ecosystem.
-MAJOR.MINOR.PATCH
+## Purpose
-### Pre-release versions
+Introduce high-level support classes like `Str` and `Collection` in Core-Foundation.
+These classes will provide a clean, object-oriented API on top of the existing low-level PHP proxy functions, enabling developers to work with strings and collections more intuitively and safely.
-Pre-release versions are tagged **only on release branches**, never directly on `develop`.
+- `Str` will wrap common string operations (manipulation, formatting, encoding) in a fluent, high-level interface.
+- `Collection` will provide an object-oriented wrapper for arrays and iterable structures, with functional utilities like map, filter, reduce, and chaining.
-Examples:
-- `v0.1.0-alpha.1`
-- `v0.1.0-beta.1`
-- `v0.1.0-rc.1`
+This layer sits above the low-level proxies, ensuring consistency, testability, and reusability across FireHub modules.
-The `develop` branch itself is considered **pre-release by definition**.
+## Scope
-## Branch Workflow
+This branch includes:
-### Main branches
+- Internal utility and support classes
+- Low-level abstractions intended for framework-internal use
+- Namespaced, final, static-style helpers designed for performance and predictability
-| Branch | Purpose |
-|-----------------|-----------------------------------------|
-| `master` | Production-ready, stable releases only |
-| `develop` | Active development & integration |
-| `release/x.y.z` | Release preparation & stabilization |
-| `vX.y.z` | Maintenance branches for older versions |
+Out of scope for this branch:
-### Supporting branches
+- Public-facing APIs
+- High-level domain abstractions
+- Framework features or adapters
+- Tooling (tests, PHAR, CI pipelines)
-| Branch | Purpose |
-|-----------------|-----------------------------------|
-| `feature/*` | New features |
-| `bugfix/*` | Bug fixes |
-| `patch/*` | Patch |
-| `hotfix/*` | Critical fixes for production |
-| `experiment/*` | Prototypes and experiments |
-| `feature/*` | Feature branch |
-| `integration/*` | Temp branch for multiple features |
-| `wip/*` | Temporary work-in-progress |
+## Stability & Compatibility
-## Merging rules
+- Changes are internal and backward compatible
+- No public contracts are introduced or modified
+- Safe for reuse across all Core distributions
-- bugfix/* → develop
-- patch/* → develop
-- hotfix/* → master → develop -> vX.y.z
-- experiment/* → develop (only if promoted)
-- feature/* → develop
-- integration/* → develop
-- release/* → master (stable only)
+## Workflow
-❌ Direct commits to develop are discouraged
-✅ Pull requests with review are required
+- Development happens exclusively on this feature branch
+- All work is tracked via a single feature issue
+- The branch will be merged into `develop` once the scope is complete
+- The merge marks the completion of the `v0.3.0` milestone
-## Composer Usage (Not Recommended)
-For internal testing only:
+## Related
-```json
-{
- "require": {
- "firehub/core-foundation": "dev-develop"
- }
-}
-```
-⚠️ Never use dev-develop in production.
+- Milestone: **Development v1**
+- Target Release: **v0.3.0**
+- Repository: FireHub Core Foundation
##
License
This software is licensed under the Apache-2.0 License.
-For more details, read the full license [here](./LICENSE).
+For more details, read the full license [here](./LICENSE).
\ No newline at end of file
diff --git a/composer.json b/composer.json
index a2b2cf15..e2b4d5fa 100644
--- a/composer.json
+++ b/composer.json
@@ -7,18 +7,15 @@
"license": "Apache-2.0",
"require": {
"php": "^8.5",
+ "ext-openssl": "*",
"ext-mbstring": "*"
},
"require-dev": {
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0",
+ "firehub/phpstan-rules": "^1.0",
"phpunit/phpunit": "^13.0"
},
- "autoload-dev": {
- "psr-4": {
- "FireHub\\PHPStan\\": "phpstan/"
- }
- },
"minimum-stability": "dev",
"prefer-stable": true,
"authors": [
diff --git a/dist/core.min.phar b/dist/core.min.phar
new file mode 100644
index 00000000..ede04138
Binary files /dev/null and b/dist/core.min.phar differ
diff --git a/dist/core.min.phar.pubkey b/dist/core.min.phar.pubkey
new file mode 100644
index 00000000..c7b78e2e
--- /dev/null
+++ b/dist/core.min.phar.pubkey
@@ -0,0 +1,14 @@
+-----BEGIN PUBLIC KEY-----
+MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0IDxH1kkgj+hINvM/oMR
+w0CINronO5r+c2JWx52MrmdZw98TgMsu29XYXX92Vq6RuoVQxU9BHXZLEeeTdlJZ
+yJ8RPUM+FoKF0IfyvtUcd6P0r/Fuy6W2oAHYz9gF/Jo9OYK0gWAjf/LakLjY4BkD
+VntFcK0REXVPb88nbXk8HRTCP2cAEZU9YKopD7Q1Thq0lRRy0QSXT9E/sG4C9w9r
+mGXoTtfSB3qMkSZ4hrWkYLXeEoNVivLfOIjPv/hvHTl/kwZKFHr2Hyz/zsBREnw2
+cZfwpjdL3pNtvIonfDNbI7mDPw9joPMfpapk5BapoYyBZDuTETOC/5nw2RiX5F2n
++7THEK1u3YCqqPwVT9dWxGhH0+wcvs1QfBEcCBSXOBiFlvcw5y3yIPlwFUloDuN+
+hUn6GV68FhbKYBRUop9JhVLG/3/FCENfk7bm3vMDdWSkNWBnKt1s2LbRK4M6oBYG
+3/6xfS91zhh7XQsJvZpD6AxpsJx/50ailmgheLdycGaeflqpawC+L/fkTusOyjM1
+TKHHPKIKCieaeOW+bI1jaeKAmJuZGRouYun8No7S9ybS58Z/xjGrbLC2fjKRrRTE
+EBHb+o66gXTecCgNcSs0LmGkBLAsNL5HxhOk67GQexStuiTaAp4wjGuEPG1vQSQG
++dx6NDW9JrFPud0MgwRKTV8CAwEAAQ==
+-----END PUBLIC KEY-----
diff --git a/phar/core.phar b/dist/core.phar
similarity index 72%
rename from phar/core.phar
rename to dist/core.phar
index ea5410e2..d7f6964c 100644
Binary files a/phar/core.phar and b/dist/core.phar differ
diff --git a/dist/core.phar.pubkey b/dist/core.phar.pubkey
new file mode 100644
index 00000000..c7b78e2e
--- /dev/null
+++ b/dist/core.phar.pubkey
@@ -0,0 +1,14 @@
+-----BEGIN PUBLIC KEY-----
+MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0IDxH1kkgj+hINvM/oMR
+w0CINronO5r+c2JWx52MrmdZw98TgMsu29XYXX92Vq6RuoVQxU9BHXZLEeeTdlJZ
+yJ8RPUM+FoKF0IfyvtUcd6P0r/Fuy6W2oAHYz9gF/Jo9OYK0gWAjf/LakLjY4BkD
+VntFcK0REXVPb88nbXk8HRTCP2cAEZU9YKopD7Q1Thq0lRRy0QSXT9E/sG4C9w9r
+mGXoTtfSB3qMkSZ4hrWkYLXeEoNVivLfOIjPv/hvHTl/kwZKFHr2Hyz/zsBREnw2
+cZfwpjdL3pNtvIonfDNbI7mDPw9joPMfpapk5BapoYyBZDuTETOC/5nw2RiX5F2n
++7THEK1u3YCqqPwVT9dWxGhH0+wcvs1QfBEcCBSXOBiFlvcw5y3yIPlwFUloDuN+
+hUn6GV68FhbKYBRUop9JhVLG/3/FCENfk7bm3vMDdWSkNWBnKt1s2LbRK4M6oBYG
+3/6xfS91zhh7XQsJvZpD6AxpsJx/50ailmgheLdycGaeflqpawC+L/fkTusOyjM1
+TKHHPKIKCieaeOW+bI1jaeKAmJuZGRouYun8No7S9ybS58Z/xjGrbLC2fjKRrRTE
+EBHb+o66gXTecCgNcSs0LmGkBLAsNL5HxhOk67GQexStuiTaAp4wjGuEPG1vQSQG
++dx6NDW9JrFPud0MgwRKTV8CAwEAAQ==
+-----END PUBLIC KEY-----
diff --git a/phar/core.min.phar b/phar/core.min.phar
deleted file mode 100644
index 4b6b72fa..00000000
Binary files a/phar/core.min.phar and /dev/null differ
diff --git a/phar/core.min.phar.pubkey b/phar/core.min.phar.pubkey
deleted file mode 100644
index a4c4ad24..00000000
--- a/phar/core.min.phar.pubkey
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN PUBLIC KEY-----
-MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAl2Cl9wpddZ6U45qE7GpV
-xmrmWKwll34ApLrWiiaMkOFz/swgjX4SlTIDXoeaWDjUZqIScgIC+GU2DFNahLrS
-+2uzjXXPwh4cybJH3o/iCz710mk7oNVweJoDsTukGB8mTH91Op4XSxQGfZeHWQF1
-zvCZy6UNcQD+6BeHIE0hzJlzD4pvfJbkxABPDBAU92w2a5fWQ/k0eh4djWpUULG0
-mBgTdVRDlFyyzjPyLxuB5XtkmMmv4ByVqUHQccPhFikv3kpnR1jqeHLvwMARnFc/
-XwureYAX4PwjJrGg1c2P2OPlBeHE0JjHOCpj2o12bM65PTrfLIaGmkmUsjHaQh3B
-zTPoxE5mVIxn6LSiAh3k7HwGg4tmpuELyHgVblSP+HyUWDj4HLzUxHyP4BiceusZ
-d5HPx3Wc7s3hRlH8gMrSyleGD6Im8ecBvFKFiWDSqIiqIV1pUBlIKHkckfFkWYeZ
-W+piWgGwJlYc270Fitl7e2XJ7Vq9bDf26sqeyINA8KbqRn9yeQn6v1cQsd0fIObC
-sngASw7/nEHS8GOml0BfJaJmviQO/BItfJDl0sLPmZX7fIiI/51gxFCaJtyqany9
-ak8mmSp2zbechnWBUMPEPf7pddz9KH7Rli3OHmcT81PDAl+sumF2f/DcobTz5PM/
-YuRzBylkXVSUdrlugFSDv88CAwEAAQ==
------END PUBLIC KEY-----
\ No newline at end of file
diff --git a/phar/core.phar.pubkey b/phar/core.phar.pubkey
deleted file mode 100644
index a4c4ad24..00000000
--- a/phar/core.phar.pubkey
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN PUBLIC KEY-----
-MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAl2Cl9wpddZ6U45qE7GpV
-xmrmWKwll34ApLrWiiaMkOFz/swgjX4SlTIDXoeaWDjUZqIScgIC+GU2DFNahLrS
-+2uzjXXPwh4cybJH3o/iCz710mk7oNVweJoDsTukGB8mTH91Op4XSxQGfZeHWQF1
-zvCZy6UNcQD+6BeHIE0hzJlzD4pvfJbkxABPDBAU92w2a5fWQ/k0eh4djWpUULG0
-mBgTdVRDlFyyzjPyLxuB5XtkmMmv4ByVqUHQccPhFikv3kpnR1jqeHLvwMARnFc/
-XwureYAX4PwjJrGg1c2P2OPlBeHE0JjHOCpj2o12bM65PTrfLIaGmkmUsjHaQh3B
-zTPoxE5mVIxn6LSiAh3k7HwGg4tmpuELyHgVblSP+HyUWDj4HLzUxHyP4BiceusZ
-d5HPx3Wc7s3hRlH8gMrSyleGD6Im8ecBvFKFiWDSqIiqIV1pUBlIKHkckfFkWYeZ
-W+piWgGwJlYc270Fitl7e2XJ7Vq9bDf26sqeyINA8KbqRn9yeQn6v1cQsd0fIObC
-sngASw7/nEHS8GOml0BfJaJmviQO/BItfJDl0sLPmZX7fIiI/51gxFCaJtyqany9
-ak8mmSp2zbechnWBUMPEPf7pddz9KH7Rli3OHmcT81PDAl+sumF2f/DcobTz5PM/
-YuRzBylkXVSUdrlugFSDv88CAwEAAQ==
------END PUBLIC KEY-----
\ No newline at end of file
diff --git a/phpstan.neon b/phpstan.neon
index beda53bc..1486efd6 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -1,17 +1,13 @@
includes:
- phar://phpstan.phar/conf/bleedingEdge.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
- - phpstan/rule.neon
- - phpstan/type.neon
+ - vendor/firehub/phpstan-rules/rule.neon
+ - vendor/firehub/phpstan-rules/type.neon
parameters:
level: max
paths:
- src/
- - phpstan/
- excludePaths:
- analyse:
- - phpstan/**
tmpDir: storage/cache/phpstan/
ignoreErrors:
- identifier: ternary.shortNotAllowed
diff --git a/phpstan/Rule/NoNativeFunctionsRule.php b/phpstan/Rule/NoNativeFunctionsRule.php
deleted file mode 100644
index ee90c1ed..00000000
--- a/phpstan/Rule/NoNativeFunctionsRule.php
+++ /dev/null
@@ -1,125 +0,0 @@
-
- * @copyright 2026 The FireHub Project - All rights reserved
- * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
- *
- * @php-version 7.4
- * @package Core\PHPStan
- *
- * @version GIT: $Id$ Blob checksum.
- */
-
-namespace FireHub\PHPStan\Rule;
-
-use PhpParser\ {
- Node, Node\Expr\FuncCall
-};
-use PHPStan\Analyser\Scope;
-use PHPStan\Rules\ {
- Rule, RuleErrorBuilder
-};
-use PHPStan\Reflection\ReflectionProvider;
-
-/**
- * ### Rule that forbids direct usage of native functions
- * @since 1.0.0
- *
- * @template TNodeType of Node
- *
- * @implements Rule
- */
-final class NoNativeFunctionsRule implements Rule {
-
- /**
- * ## Constructor
- * @since 1.0.0
- *
- * @param \PHPStan\Reflection\ReflectionProvider $reflectionProvider
- * Reflection provider for class hierarchy checks.
- *
- *
- * @return void
- */
- public function __construct(
- private ReflectionProvider $reflectionProvider
- ) {}
-
- /**
- * ### Returns the node type this rule is interested in
- * @since 1.0.0
- *
- * @return class-string All function calls.
- */
- public function getNodeType ():string {
-
- return FuncCall::class;
-
- }
-
- /**
- * ### Process the node
- * @since 1.0.0
- *
- * @param TNodeType $node
- * The node.
- *
- * @param \PHPStan\Analyser\Scope&\PHPStan\Analyser\NodeCallbackInvoker $scope
- * The scope.
- *
- *
- * @throws \PHPStan\ShouldNotHappenException If error occurs.
- *
- * @return array{\PHPStan\Rules\RuleError} Error messages.
- */
- public function processNode (Node $node, Scope $scope):array {
-
- $classReflection = $scope->getClassReflection();
-
- if (
- $classReflection !== null &&
- $classReflection->isSubclassOfClass($this->reflectionProvider
- ->getClass(\FireHub\Core\Support\LowLevel::class))
- ) {
- return [];
- }
-
- if (!$node instanceof FuncCall) return [];
-
- $name = $node->name;
-
- if ($name instanceof Node\Name) {
-
- $funcName = strtolower((string)$name);
-
- $list = array_values(
- array_diff(
- get_defined_functions()['internal'],
- [
- 'func_num_args',
- 'func_get_arg',
- 'func_get_args',
- ]
- )
- );
-
- if (in_array($funcName, $list, true)) {
-
- return [
- RuleErrorBuilder::message(sprintf(
- 'Do not use native function %s(), use FireHub LowLevel wrapper instead.',
- $funcName
- ))->build()
- ];
-
- }
-
- }
-
- return [];
-
- }
-}
\ No newline at end of file
diff --git a/phpstan/Type/MathMaxReturnTypeExtension.php b/phpstan/Type/MathMaxReturnTypeExtension.php
deleted file mode 100644
index 2fbd44aa..00000000
--- a/phpstan/Type/MathMaxReturnTypeExtension.php
+++ /dev/null
@@ -1,130 +0,0 @@
-
- * @copyright 2026 The FireHub Project - All rights reserved
- * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
- *
- * @php-version 7.4
- * @package Core\PHPStan
- *
- * @version GIT: $Id$ Blob checksum.
- */
-
-namespace FireHub\PHPStan\Type;
-
-use FireHub\Core\Support\LowLevel\Math;
-use PhpParser\Node\ {
- Arg, Expr\StaticCall
-};
-use PHPStan\Analyser\Scope;
-use PHPStan\Reflection\MethodReflection;
-use PHPStan\Type\ {
- Constant\ConstantBooleanType, ConstantTypeHelper, DynamicStaticMethodReturnTypeExtension, FloatType,
- IntegerRangeType, IntegerType, MixedType, Type, TypeCombinator
-};
-use Throwable;
-
-/**
- * ### Extends PHPStan's `max()` function to support constant folding
- * @since 1.0.0
- */
-final class MathMaxReturnTypeExtension implements DynamicStaticMethodReturnTypeExtension {
-
- /**
- * ### Returns the class name
- * @since 1.0.0
- *
- * @return class-string Class FQN.
- */
- public function getClass ():string {
-
- return Math::class;
-
- }
-
- /**
- * ### Returns whether the method is supported
- * @since 1.0.0
- *
- * @param \PHPStan\Reflection\MethodReflection $methodReflection
- * The method reflection instance.
- *
- *
- * @return bool True if the method is supported.
- */
- public function isStaticMethodSupported (MethodReflection $methodReflection): bool {
-
- return $methodReflection->getName() === 'max';
-
- }
-
- /**
- * ### Returns the type of the method
- * @since 1.0.0
- *
- * @param \PHPStan\Reflection\MethodReflection $methodReflection
- * The method reflection instance.
- *
- * @param \PhpParser\Node\Expr\StaticCall $methodCall
- * The method call node.
- *
- * @param \PHPStan\Analyser\Scope $scope
- * The current scope.
- *
- *
- * @return \PHPStan\Type\Type The type.
- */
- public function getTypeFromStaticMethodCall (MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope):Type {
-
- $types = [];
-
- foreach ($methodCall->args as $arg)
- if ($arg instanceOf Arg)
- $types[] = $scope->getType($arg->value);
-
- if ($types === []) return new MixedType();
-
- $values = null;
- foreach ($types as $type) {
-
- foreach ($type->getConstantScalarValues() as $value)
- $values[] = $value;
-
- }
-
- if ($values !== null) {
-
- try {
-
- $max = max(...$values);
-
- return ConstantTypeHelper::getTypeFromValue($max);
-
- } catch (Throwable) {}
-
- }
-
- $result = TypeCombinator::union(...$types);
-
- if (
- $result->isSuperTypeOf(new IntegerType())->yes()
- || $result->isSuperTypeOf(new FloatType())->yes()
- ) {
-
- TypeCombinator::remove(
- $result,
- new ConstantBooleanType(false)
- );
-
- $result = IntegerRangeType::fromInterval(0, null);
-
- }
-
- return $result;
-
- }
-
-}
\ No newline at end of file
diff --git a/phpstan/Type/MathMinReturnTypeExtension.php b/phpstan/Type/MathMinReturnTypeExtension.php
deleted file mode 100644
index d0370c62..00000000
--- a/phpstan/Type/MathMinReturnTypeExtension.php
+++ /dev/null
@@ -1,130 +0,0 @@
-
- * @copyright 2026 The FireHub Project - All rights reserved
- * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
- *
- * @php-version 7.4
- * @package Core\PHPStan
- *
- * @version GIT: $Id$ Blob checksum.
- */
-
-namespace FireHub\PHPStan\Type;
-
-use FireHub\Core\Support\LowLevel\Math;
-use PhpParser\Node\ {
- Arg, Expr\StaticCall
-};
-use PHPStan\Analyser\Scope;
-use PHPStan\Reflection\MethodReflection;
-use PHPStan\Type\ {
- Constant\ConstantBooleanType, ConstantTypeHelper, DynamicStaticMethodReturnTypeExtension, FloatType,
- IntegerRangeType, IntegerType, MixedType, Type, TypeCombinator
-};
-use Throwable;
-
-/**
- * ### Extends PHPStan's `min()` function to support constant folding
- * @since 1.0.0
- */
-final class MathMinReturnTypeExtension implements DynamicStaticMethodReturnTypeExtension {
-
- /**
- * ### Returns the class name
- * @since 1.0.0
- *
- * @return class-string Class FQN.
- */
- public function getClass ():string {
-
- return Math::class;
-
- }
-
- /**
- * ### Returns whether the method is supported
- * @since 1.0.0
- *
- * @param \PHPStan\Reflection\MethodReflection $methodReflection
- * The method reflection instance.
- *
- *
- * @return bool True if the method is supported.
- */
- public function isStaticMethodSupported (MethodReflection $methodReflection): bool {
-
- return $methodReflection->getName() === 'min';
-
- }
-
- /**
- * ### Returns the type of the method
- * @since 1.0.0
- *
- * @param \PHPStan\Reflection\MethodReflection $methodReflection
- * The method reflection instance.
- *
- * @param \PhpParser\Node\Expr\StaticCall $methodCall
- * The method call node.
- *
- * @param \PHPStan\Analyser\Scope $scope
- * The current scope.
- *
- *
- * @return \PHPStan\Type\Type The type.
- */
- public function getTypeFromStaticMethodCall (MethodReflection $methodReflection, StaticCall $methodCall, Scope $scope):Type {
-
- $types = [];
-
- foreach ($methodCall->args as $arg)
- if ($arg instanceOf Arg)
- $types[] = $scope->getType($arg->value);
-
- if ($types === []) return new MixedType();
-
- $values = null;
- foreach ($types as $type) {
-
- foreach ($type->getConstantScalarValues() as $value)
- $values[] = $value;
-
- }
-
- if ($values !== null) {
-
- try {
-
- $min = min(...$values);
-
- return ConstantTypeHelper::getTypeFromValue($min);
-
- } catch (Throwable) {}
-
- }
-
- $result = TypeCombinator::union(...$types);
-
- if (
- $result->isSuperTypeOf(new IntegerType())->yes()
- || $result->isSuperTypeOf(new FloatType())->yes()
- ) {
-
- TypeCombinator::remove(
- $result,
- new ConstantBooleanType(false)
- );
-
- $result = IntegerRangeType::fromInterval(0, null);
-
- }
-
- return $result;
-
- }
-
-}
\ No newline at end of file
diff --git a/phpstan/rule.neon b/phpstan/rule.neon
deleted file mode 100644
index eeca4a1b..00000000
--- a/phpstan/rule.neon
+++ /dev/null
@@ -1,4 +0,0 @@
-services:
- - class: FireHub\PHPStan\Rule\NoNativeFunctionsRule
- tags:
- - phpstan.rules.rule
\ No newline at end of file
diff --git a/phpstan/type.neon b/phpstan/type.neon
deleted file mode 100644
index f53a04e5..00000000
--- a/phpstan/type.neon
+++ /dev/null
@@ -1,7 +0,0 @@
-services:
- - class: FireHub\PHPStan\Type\MathMaxReturnTypeExtension
- tags:
- - phpstan.broker.dynamicStaticMethodReturnTypeExtension
- - class: FireHub\PHPStan\Type\MathMinReturnTypeExtension
- tags:
- - phpstan.broker.dynamicStaticMethodReturnTypeExtension
\ No newline at end of file
diff --git a/src/domain/autoload/firehub.Handle.php b/src/domain/autoload/firehub.Handle.php
index c8fba260..29004310 100644
--- a/src/domain/autoload/firehub.Handle.php
+++ b/src/domain/autoload/firehub.Handle.php
@@ -9,8 +9,6 @@
*
* @php-version 8.2
* @package Core\Domain
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Domain\Autoload;
diff --git a/src/firehub.FireHub.php b/src/firehub.FireHub.php
index c4c5a68e..b3ddd6c4 100644
--- a/src/firehub.FireHub.php
+++ b/src/firehub.FireHub.php
@@ -9,15 +9,13 @@
*
* @php-version 8.4
* @package Core
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core;
use FireHub\Core\Support\Bootstrap\FireHubConfigurator;
use FireHub\Core\Support\Bootstrap\Bootloader;
-use FireHub\Core\Throwable\Exception\Bootstrap\ {
+use FireHub\Core\Throwable\Exception\Support\Bootstrap\ {
FailedToLoadBootloaderException, NotBootloaderException
};
use FireHub\Core\Support\LowLevel\ {
@@ -59,9 +57,10 @@ final class FireHub {
* FireHub configurator.
*
*
- * @throws \FireHub\Core\Throwable\Exception\Bootstrap\FailedToLoadBootloaderException If a bootloader fails to
- * load.
- * @throws \FireHub\Core\Throwable\Exception\Bootstrap\NotBootloaderException If a bootloader is not a bootloader.
+ * @throws \FireHub\Core\Throwable\Exception\Support\Bootstrap\FailedToLoadBootloaderException If a bootloader
+ * fails to load.
+ * @throws \FireHub\Core\Throwable\Exception\Support\Bootstrap\NotBootloaderException If a bootloader is not
+ * a bootloader.
*
* @return void
*/
@@ -96,9 +95,11 @@ public function boot ():string {
* @uses \FireHub\Core\Support\LowLevel\ClsObj::ofClass() To check if the $value is a bootloader.
* @uses \FireHub\Core\Support\Bootstrap\Bootloader::boot() To boot a bootloader.
*
- * @throws \FireHub\Core\Throwable\Exception\Bootstrap\FailedToLoadBootloaderException If a bootloader fails to
- * load.
- * @throws \FireHub\Core\Throwable\Exception\Bootstrap\NotBootloaderException If a bootloader is not a bootloader.
+ * @throws \FireHub\Core\Shared\Contracts\Throwable
+ * @throws \FireHub\Core\Throwable\Exception\Support\Bootstrap\FailedToLoadBootloaderException If a bootloader
+ * fails to load.
+ * @throws \FireHub\Core\Throwable\Exception\Support\Bootstrap\NotBootloaderException If a bootloader is not
+ * a bootloader.
*
* @return void
*/
@@ -108,17 +109,20 @@ private function loadBootloaders ():void {
match (true) {
DataIs::string($key) && DataIs::array($value) && ClsObj::ofClass($key, Bootloader::class)
=> new $key(...$value)->boot()
- ?: FailedToLoadBootloaderException::builder()
+ ?: throw FailedToLoadBootloaderException::builder()
->withContext(['class' => $key])
- ->throw(),
+ ->build(),
DataIs::string($value) && ClsObj::ofClass($value, Bootloader::class)
=> new $value()->boot()
- ?: FailedToLoadBootloaderException::builder()
+ ?: throw FailedToLoadBootloaderException::builder()
->withContext(['class' => $value])
- ->throw(),
- default => NotBootloaderException::builder()
- ->withContext(['bootloader' => ''])
- ->throw()
+ ->build(),
+ default => throw NotBootloaderException::builder()
+ ->withContext([
+ 'key' => $key,
+ 'value' => $value
+ ])
+ ->build()
};
}
diff --git a/src/public/boot.php b/src/public/boot.php
index 57d187c8..58f7a5a8 100644
--- a/src/public/boot.php
+++ b/src/public/boot.php
@@ -12,11 +12,12 @@
*
* @php-version 7.0
* @package Core\Public
- *
- * @version GIT: $Id$ Blob checksum.
*/
-namespace FireHub\Public;
+namespace FireHub\Core\Public;
+
+/** ### Register the Composer autoloader */
+require __DIR__.'/../../vendor/autoload.php';
require __DIR__ . '/index.php';
@@ -26,9 +27,10 @@
* ### Let there be light
* @since 1.0.0
*
- * @throws \FireHub\Core\Throwable\Exception\Bootstrap\FailedToLoadBootloaderException If a bootloader fails to
- * load.
- * @throws \FireHub\Core\Throwable\Exception\Bootstrap\NotBootloaderException If a bootloader is not a bootloader.
+ * @throws \FireHub\Core\Throwable\Exception\Support\Bootstrap\FailedToLoadBootloaderException If a bootloader
+ * fails to load.
+ * @throws \FireHub\Core\Throwable\Exception\Support\Bootstrap\NotBootloaderException If a bootloader is not
+ * a bootloader.
*
* @return \FireHub\Core\FireHub
*/
diff --git a/src/public/index.php b/src/public/index.php
index 89289757..24c76c4f 100644
--- a/src/public/index.php
+++ b/src/public/index.php
@@ -12,11 +12,9 @@
*
* @php-version 7.0
* @package Core\Public
- *
- * @version GIT: $Id$ Blob checksum.
*/
-namespace FireHub\Public;
+namespace FireHub\Core\Public;
require __DIR__.'/../support/firehub.LowLevel.php';
require __DIR__.'/../support/firehub.Autoload.php';
diff --git a/src/shared/constants/firehub.Number.php b/src/shared/constants/firehub.Number.php
index f5ee6220..f5f02cdc 100644
--- a/src/shared/constants/firehub.Number.php
+++ b/src/shared/constants/firehub.Number.php
@@ -9,8 +9,6 @@
*
* @php-version 7.0
* @package Core\Support
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Constants\Number;
diff --git a/src/shared/constants/firehub.Path.php b/src/shared/constants/firehub.Path.php
index 4c4b8a50..2402206c 100644
--- a/src/shared/constants/firehub.Path.php
+++ b/src/shared/constants/firehub.Path.php
@@ -9,8 +9,6 @@
*
* @php-version 7.0
* @package Core\Support
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Constants\Path;
diff --git a/src/shared/contracts/firehub.ArrayConvertable.php b/src/shared/contracts/firehub.ArrayConvertable.php
new file mode 100644
index 00000000..32965e8f
--- /dev/null
+++ b/src/shared/contracts/firehub.ArrayConvertable.php
@@ -0,0 +1,44 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Shared
+ */
+
+namespace FireHub\Core\Shared\Contracts;
+
+/**
+ * ### ArrayConstructable interface
+ *
+ * Objects that can be created from arrays and can convert themselves to arrays.
+ * @since 1.0.0
+ *
+ * @template TKey of array-key
+ * @template TValue
+ *
+ * @extends \FireHub\Core\Shared\Contracts\Arrayable
+ */
+interface ArrayConvertable extends Arrayable {
+
+ /**
+ * ### Create a new object from an array
+ *
+ * This static method constructs a new instance of the implementing class using the provided array as its initial
+ * data storage.
+ * @since 1.0.0
+ *
+ * @param array $array
+ * Input data for creating the object.
+ *
+ *
+ * @return static A new instance of the implementing class.
+ */
+ public static function fromArray (array $array):static;
+
+}
\ No newline at end of file
diff --git a/src/shared/contracts/firehub.Arrayable.php b/src/shared/contracts/firehub.Arrayable.php
new file mode 100644
index 00000000..1896b453
--- /dev/null
+++ b/src/shared/contracts/firehub.Arrayable.php
@@ -0,0 +1,33 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Shared
+ */
+
+namespace FireHub\Core\Shared\Contracts;
+
+/**
+ * ### Represents an object that can be converted into an array representation
+ * @since 1.0.0
+ *
+ * @template TKey of array-key
+ * @template TValue
+ */
+interface Arrayable {
+
+ /**
+ * ### Convert object to array
+ * @since 1.0.0
+ *
+ * @return array Object as an array.
+ */
+ public function toArray ():array;
+
+}
\ No newline at end of file
diff --git a/src/shared/contracts/firehub.Countable.php b/src/shared/contracts/firehub.Countable.php
new file mode 100644
index 00000000..9c4654c7
--- /dev/null
+++ b/src/shared/contracts/firehub.Countable.php
@@ -0,0 +1,34 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Shared
+ */
+
+namespace FireHub\Core\Shared\Contracts;
+
+use Countable as InternalCountable;
+
+/**
+ * ### Countable contract
+ *
+ * Classes implementing Countable can be used with the count() function.
+ * @since 1.0.0
+ */
+interface Countable extends InternalCountable {
+
+ /**
+ * ### Count elements of an object
+ * @since 1.0.0
+ *
+ * @return non-negative-int Number of elements of an object.
+ */
+ public function count ():int;
+
+}
\ No newline at end of file
diff --git a/src/shared/contracts/firehub.DataTransferObject.php b/src/shared/contracts/firehub.DataTransferObject.php
new file mode 100644
index 00000000..72e3e36c
--- /dev/null
+++ b/src/shared/contracts/firehub.DataTransferObject.php
@@ -0,0 +1,33 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Shared
+ */
+
+namespace FireHub\Core\Shared\Contracts;
+
+/**
+ * ### Data Transfer Object Contract
+ *
+ * Defines a strict boundary object used for transferring structured state between data structures, hydration
+ * pipelines, codecs, and persistence layers.
+ *
+ * A DataTransferObject is an immutable representation of a canonical state snapshot. It contains no business logic and
+ * must not depend on storage, runtime memory layout, or execution context.
+ *
+ * It serves as the bridge between:
+ * - DataStructure (domain logic)
+ * - Dehydrated state (canonical representation)
+ * - Codec layer (serialization/encoding)
+ * - Persistence layer (storage systems)
+ *
+ * @since 1.0.0
+ */
+interface DataTransferObject {}
\ No newline at end of file
diff --git a/src/shared/contracts/firehub.Iterator.php b/src/shared/contracts/firehub.Iterator.php
new file mode 100644
index 00000000..9a3ee4fd
--- /dev/null
+++ b/src/shared/contracts/firehub.Iterator.php
@@ -0,0 +1,79 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Shared
+ */
+
+namespace FireHub\Core\Shared\Contracts;
+
+use Iterator as InternalIterator;
+
+/**
+ * ### Base iterator contract
+ *
+ * Interface for external iterators or objects that can be iterated themselves internally.
+ * @since 1.0.0
+ *
+ * @template TKey
+ * @template TValue
+ *
+ * @extends Traversable
+ * @extends InternalIterator
+ */
+interface Iterator extends Traversable, InternalIterator {
+
+ /**
+ * ### Checks if the current position is valid
+ * @since 1.0.0
+ *
+ * @return bool True on success or false on failure.
+ *
+ * @note This method is called after rewind() and next() to check if the current position is valid.
+ */
+ public function valid ():bool;
+
+ /**
+ * ### Return the current element
+ * @since 1.0.0
+ *
+ * @return TValue Current element.
+ */
+ public function current ():mixed;
+
+ /**
+ * ### Return the key of the current element
+ * @since 1.0.0
+ *
+ * @return null|TKey Key of the current element.
+ */
+ public function key ():mixed;
+
+ /**
+ * ### Move forward to the next element
+ * @since 1.0.0
+ *
+ * @return void
+ *
+ * @note This method is called after each foreach loop.
+ */
+ public function next ():void;
+
+ /**
+ * ### Rewind the iterator to the first element
+ * @since 1.0.0
+ *
+ * @return void
+ *
+ * @note This is the first method called when starting a foreach loop.
+ * It will not be executed after foreach loops.
+ */
+ public function rewind ():void;
+
+}
\ No newline at end of file
diff --git a/src/shared/contracts/firehub.IteratorAggregate.php b/src/shared/contracts/firehub.IteratorAggregate.php
new file mode 100644
index 00000000..7c4cc33f
--- /dev/null
+++ b/src/shared/contracts/firehub.IteratorAggregate.php
@@ -0,0 +1,40 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Shared
+ */
+
+namespace FireHub\Core\Shared\Contracts;
+
+use IteratorAggregate as InternalIteratorAggregate, Traversable as InternalTraversable;
+
+/**
+ * ### Base iterator aggregate contract
+ *
+ * Interface for external iterators or objects that can be iterated themselves internally.
+ * @since 1.0.0
+ *
+ * @template TKey
+ * @template TValue
+ *
+ * @extends Traversable
+ * @extends InternalIteratorAggregate
+ */
+interface IteratorAggregate extends Traversable, InternalIteratorAggregate {
+
+ /**
+ * ### Retrieve an external iterator
+ * @since 1.0.0
+ *
+ * @return InternalTraversable An instance of an object implementing Iterator or Traversable.
+ */
+ public function getIterator ():InternalTraversable;
+
+}
\ No newline at end of file
diff --git a/src/shared/contracts/firehub.JsonSerializable.php b/src/shared/contracts/firehub.JsonSerializable.php
new file mode 100644
index 00000000..facd71e7
--- /dev/null
+++ b/src/shared/contracts/firehub.JsonSerializable.php
@@ -0,0 +1,61 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Shared
+ */
+
+namespace FireHub\Core\Shared\Contracts;
+
+use FireHub\Core\Shared\Enums\Json\ {
+ Flag, Flag\Encode
+};
+use JsonSerializable as InternalJsonSerializable;
+
+/**
+ * ### JsonSerializable contract
+ *
+ * Objects implementing JsonSerializable can customize their JSON representation when encoded with json_encode()
+ * @since 1.0.0
+ *
+ * @template TKey of array-key
+ * @template TValue
+ */
+interface JsonSerializable extends InternalJsonSerializable {
+
+ /**
+ * ### JSON representation of an object
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Shared\Enums\Json\Flag As parameter.
+ * @uses \FireHub\Core\Shared\Enums\Json\Flag\Encode As parameter.
+ *
+ * @param positive-int $depth
+ * Set the maximum depth.
+ *
+ * @param \FireHub\Core\Shared\Enums\Json\Flag|\FireHub\Core\Shared\Enums\Json\Flag\Encode ...$flags
+ * JSON flags.
+ *
+ *
+ * @return non-empty-string JSON encoded string.
+ */
+ public function toJson (int $depth = 512, Flag|Encode ...$flags):string;
+
+ /**
+ * ### Specify data which should be serialized to JSON
+ *
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @since 1.0.0
+ *
+ * @return array Data which can be serialized by json_encode(), which is a value of any type
+ * other than a resource.
+ */
+ public function jsonSerialize ():array;
+
+}
\ No newline at end of file
diff --git a/src/shared/contracts/firehub.JsonSerializableConvertable.php b/src/shared/contracts/firehub.JsonSerializableConvertable.php
new file mode 100644
index 00000000..558d9a88
--- /dev/null
+++ b/src/shared/contracts/firehub.JsonSerializableConvertable.php
@@ -0,0 +1,52 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Shared
+ */
+
+namespace FireHub\Core\Shared\Contracts;
+
+use FireHub\Core\Shared\Enums\Json\ {
+ Flag, Flag\Decode
+};
+
+/**
+ * ### JsonSerializable-convertable object that can be created from and converted to JSON
+ * @since 1.0.0
+ *
+ * @template TKey of array-key
+ * @template TValue
+ *
+ * @extends \FireHub\Core\Shared\Contracts\JsonSerializable
+ */
+interface JsonSerializableConvertable extends JsonSerializable {
+
+ /**
+ * ### Get object from JSON
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Shared\Enums\Json\Flag As parameter.
+ * @uses \FireHub\Core\Shared\Enums\Json\Flag\Decode As parameter.
+ *
+ * @param string $json
+ * The JSON string being decoded.
+ *
+ * @param positive-int $depth [optional]
+ * Set the maximum depth.
+ *
+ * @param \FireHub\Core\Shared\Enums\Json\Flag|\FireHub\Core\Shared\Enums\Json\Flag\Decode ...$flags
+ * JSON flags.
+ *
+ *
+ * @return static This object from JSON encoded parameter.
+ */
+ public static function fromJson (string $json, int $depth = 512, Flag|Decode ...$flags):static;
+
+}
\ No newline at end of file
diff --git a/src/shared/contracts/firehub.Throwable.php b/src/shared/contracts/firehub.Throwable.php
index 7b3c6f85..431eb89c 100644
--- a/src/shared/contracts/firehub.Throwable.php
+++ b/src/shared/contracts/firehub.Throwable.php
@@ -9,8 +9,6 @@
*
* @php-version 8.0
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Contracts;
diff --git a/src/shared/contracts/firehub.Traversable.php b/src/shared/contracts/firehub.Traversable.php
new file mode 100644
index 00000000..e2c417dd
--- /dev/null
+++ b/src/shared/contracts/firehub.Traversable.php
@@ -0,0 +1,29 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Shared
+ */
+
+namespace FireHub\Core\Shared\Contracts;
+
+use Traversable as InternalTraversable;
+
+/**
+ * ### Base traversable contract
+ *
+ * Interface to detect if a class is traversable using foreach.
+ * @since 1.0.0
+ *
+ * @template TKey
+ * @template TValue
+ *
+ * @extends InternalTraversable
+ */
+interface Traversable extends InternalTraversable {}
\ No newline at end of file
diff --git a/src/shared/contracts/magic/firehub.Serializable.php b/src/shared/contracts/magic/firehub.Serializable.php
new file mode 100644
index 00000000..5746ed24
--- /dev/null
+++ b/src/shared/contracts/magic/firehub.Serializable.php
@@ -0,0 +1,44 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.0
+ * @package Core\Shared
+ */
+
+namespace FireHub\Core\Shared\Contracts\Magic;
+
+/**
+ * ### Serializable contract
+ *
+ * Contract allows serialization for objects.
+ * @since 1.0.0
+ *
+ * @template TKey of array-key
+ * @template TValue
+ */
+interface Serializable {
+
+ /**
+ * ### Generates storable representation of an object
+ * @since 1.0.0
+ *
+ * @return string String containing a byte-stream representation of an object that can be stored anywhere.
+ */
+ public function serialize ():string;
+
+ /**
+ * ### Construct and return an associative array of key/value pairs that represent the serialized form of the object
+ * @since 1.0.0
+ *
+ * @return array An associative array of key/value pairs that represent the serialized form
+ * of the object.
+ */
+ public function __serialize ():array;
+
+}
\ No newline at end of file
diff --git a/src/shared/contracts/magic/firehub.SerializableConvertable.php b/src/shared/contracts/magic/firehub.SerializableConvertable.php
new file mode 100644
index 00000000..47399378
--- /dev/null
+++ b/src/shared/contracts/magic/firehub.SerializableConvertable.php
@@ -0,0 +1,54 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.0
+ * @package Core\Shared
+ */
+
+namespace FireHub\Core\Shared\Contracts\Magic;
+
+/**
+ * ### Serializable-convertable object that can be serialized and unserialized
+ * @since 1.0.0
+ *
+ * @template TKey of array-key
+ * @template TValue
+ *
+ * @extends \FireHub\Core\Shared\Contracts\Magic\Serializable
+ */
+interface SerializableConvertable extends Serializable {
+
+ /**
+ * ### Creates an object from a stored representation
+ * @since 1.0.0
+ *
+ * @param non-empty-string $data
+ * The serialized string.
+ *
+ * @param positive-int $max_depth [optional]
+ * The maximum depth of structures is permitted during unserialization and is intended to prevent stack overflows.
+ *
+ *
+ * @return static Object from a serialized parameter.
+ */
+ public static function unserialize (string $data, int $max_depth = 4096):static;
+
+ /**
+ * ### Converts from serialized data back to the object
+ * @since 1.0.0
+ *
+ * @param array $data
+ * Serialized data.
+ *
+ *
+ * @return void
+ */
+ public function __unserialize (array $data):void;
+
+}
\ No newline at end of file
diff --git a/src/shared/contracts/magic/firehub.Stringable.php b/src/shared/contracts/magic/firehub.Stringable.php
index 11f0b57a..69f166fc 100644
--- a/src/shared/contracts/magic/firehub.Stringable.php
+++ b/src/shared/contracts/magic/firehub.Stringable.php
@@ -9,8 +9,6 @@
*
* @php-version 8.0
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Contracts\Magic;
diff --git a/src/shared/enums/controlflow/firehub.Signal.php b/src/shared/enums/controlflow/firehub.Signal.php
new file mode 100644
index 00000000..70ec6b18
--- /dev/null
+++ b/src/shared/enums/controlflow/firehub.Signal.php
@@ -0,0 +1,51 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.1
+ * @package Core\Shared
+ */
+
+namespace FireHub\Core\Shared\Enums\ControlFlow;
+
+/**
+ * ### Control flow signals
+ *
+ * Generic control signals that can be used to influence the flow of iteration, pipelines, or other executable
+ * sequences across the FireHub framework.
+ * @since 1.0.0
+ */
+enum Signal {
+
+ /**
+ * ### Terminate Execution Flow
+ *
+ * Immediately stops the iteration or execution sequence and prevents any further processing of remaining items.
+ * @since 1.0.0
+ */
+ case BREAK;
+
+ /**
+ * ### Continue Execution Flow
+ *
+ * Proceeds to the next iteration, marking the current item as processed and allowing normal execution flow to
+ * continue without interruption.
+ * @since 1.0.0
+ */
+ case CONTINUE;
+
+ /**
+ * ### Skip Current Processing Step
+ *
+ * Skips processing of the current iteration while keeping the iteration flow active, allowing the next item to
+ * be evaluated without executing the current processing logic.
+ * @since 1.0.0
+ */
+ case SKIP;
+
+}
\ No newline at end of file
diff --git a/src/shared/enums/data/firehub.Category.php b/src/shared/enums/data/firehub.Category.php
index 54e86e79..bdadab01 100644
--- a/src/shared/enums/data/firehub.Category.php
+++ b/src/shared/enums/data/firehub.Category.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\Data;
diff --git a/src/shared/enums/data/firehub.ResourceType.php b/src/shared/enums/data/firehub.ResourceType.php
index cb7492bf..40e2d225 100644
--- a/src/shared/enums/data/firehub.ResourceType.php
+++ b/src/shared/enums/data/firehub.ResourceType.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\Data;
diff --git a/src/shared/enums/data/firehub.Type.php b/src/shared/enums/data/firehub.Type.php
index 8d5fbd35..ea83deb4 100644
--- a/src/shared/enums/data/firehub.Type.php
+++ b/src/shared/enums/data/firehub.Type.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\Data;
diff --git a/src/shared/enums/datetime/firehub.Zone.php b/src/shared/enums/datetime/firehub.Zone.php
index 5f72399a..3a4efc82 100644
--- a/src/shared/enums/datetime/firehub.Zone.php
+++ b/src/shared/enums/datetime/firehub.Zone.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\DateTime;
diff --git a/src/shared/enums/datetime/format/firehub.Predefined.php b/src/shared/enums/datetime/format/firehub.Predefined.php
index c5967f84..9cf8ada4 100644
--- a/src/shared/enums/datetime/format/firehub.Predefined.php
+++ b/src/shared/enums/datetime/format/firehub.Predefined.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\DateTime\Format;
diff --git a/src/shared/enums/filesystem/firehub.Permission.php b/src/shared/enums/filesystem/firehub.Permission.php
index 2dd3c123..ae7280ee 100644
--- a/src/shared/enums/filesystem/firehub.Permission.php
+++ b/src/shared/enums/filesystem/firehub.Permission.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\FileSystem;
diff --git a/src/shared/enums/firehub.Comparison.php b/src/shared/enums/firehub.Comparison.php
index 9b9829f4..bf8f053a 100644
--- a/src/shared/enums/firehub.Comparison.php
+++ b/src/shared/enums/firehub.Comparison.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums;
diff --git a/src/shared/enums/firehub.MutationOutcome.php b/src/shared/enums/firehub.MutationOutcome.php
new file mode 100644
index 00000000..e30821ab
--- /dev/null
+++ b/src/shared/enums/firehub.MutationOutcome.php
@@ -0,0 +1,46 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.1
+ * @package Core\Shared
+ */
+
+namespace FireHub\Core\Shared\Enums;
+
+/**
+ * ### Mutation outcome enum
+ * @since 1.0.0
+ */
+enum MutationOutcome {
+
+ /**
+ * ### New Entry Created
+ * @since 1.0.0
+ */
+ case CREATED;
+
+ /**
+ * ### Existing Entry Updated
+ * @since 1.0.0
+ */
+ case UPDATED;
+
+ /**
+ * ### Entry Removed
+ * @since 1.0.0
+ */
+ case REMOVED;
+
+ /**
+ * ### Entry Not Found
+ * @since 1.0.0
+ */
+ case NOT_FOUND;
+
+}
\ No newline at end of file
diff --git a/src/shared/enums/firehub.Order.php b/src/shared/enums/firehub.Order.php
index f86a5210..eb578043 100644
--- a/src/shared/enums/firehub.Order.php
+++ b/src/shared/enums/firehub.Order.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums;
diff --git a/src/shared/enums/firehub.Side.php b/src/shared/enums/firehub.Side.php
index 90899f8a..69f21baf 100644
--- a/src/shared/enums/firehub.Side.php
+++ b/src/shared/enums/firehub.Side.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums;
diff --git a/src/shared/enums/json/firehub.Flag.php b/src/shared/enums/json/firehub.Flag.php
index ce08ec5f..f71f3d1a 100644
--- a/src/shared/enums/json/firehub.Flag.php
+++ b/src/shared/enums/json/firehub.Flag.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\Json;
diff --git a/src/shared/enums/json/flag/firehub.Decode.php b/src/shared/enums/json/flag/firehub.Decode.php
index 368d1851..d541208b 100644
--- a/src/shared/enums/json/flag/firehub.Decode.php
+++ b/src/shared/enums/json/flag/firehub.Decode.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\Json\Flag;
diff --git a/src/shared/enums/json/flag/firehub.Encode.php b/src/shared/enums/json/flag/firehub.Encode.php
index 7c4906ee..8da9af21 100644
--- a/src/shared/enums/json/flag/firehub.Encode.php
+++ b/src/shared/enums/json/flag/firehub.Encode.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\Json\Flag;
diff --git a/src/shared/enums/json/flag/firehub.Error.php b/src/shared/enums/json/flag/firehub.Error.php
index 388dbbc7..5410fa0f 100644
--- a/src/shared/enums/json/flag/firehub.Error.php
+++ b/src/shared/enums/json/flag/firehub.Error.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\Json\Flag;
diff --git a/src/shared/enums/json/flag/firehub.Validate.php b/src/shared/enums/json/flag/firehub.Validate.php
index a9cf5e1e..56a674b2 100644
--- a/src/shared/enums/json/flag/firehub.Validate.php
+++ b/src/shared/enums/json/flag/firehub.Validate.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\Json\Flag;
diff --git a/src/shared/enums/number/firehub.LogBase.php b/src/shared/enums/number/firehub.LogBase.php
index 2f019fa4..6e39b1f6 100644
--- a/src/shared/enums/number/firehub.LogBase.php
+++ b/src/shared/enums/number/firehub.LogBase.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\Number;
diff --git a/src/shared/enums/number/firehub.Round.php b/src/shared/enums/number/firehub.Round.php
index 3e2cebe8..db641516 100644
--- a/src/shared/enums/number/firehub.Round.php
+++ b/src/shared/enums/number/firehub.Round.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\Number;
diff --git a/src/shared/enums/string/count/firehub.CharacterMode.php b/src/shared/enums/string/count/firehub.CharacterMode.php
index 8acfff47..16ede02f 100644
--- a/src/shared/enums/string/count/firehub.CharacterMode.php
+++ b/src/shared/enums/string/count/firehub.CharacterMode.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\String\Count;
diff --git a/src/shared/enums/string/count/firehub.WordFormat.php b/src/shared/enums/string/count/firehub.WordFormat.php
index 237e96d9..1dfc7bd2 100644
--- a/src/shared/enums/string/count/firehub.WordFormat.php
+++ b/src/shared/enums/string/count/firehub.WordFormat.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\String\Count;
diff --git a/src/shared/enums/string/firehub.CaseFolding.php b/src/shared/enums/string/firehub.CaseFolding.php
index a82f6808..6d74dc51 100644
--- a/src/shared/enums/string/firehub.CaseFolding.php
+++ b/src/shared/enums/string/firehub.CaseFolding.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\String;
diff --git a/src/shared/enums/string/firehub.Compare.php b/src/shared/enums/string/firehub.Compare.php
index b8a82fce..a20703ab 100644
--- a/src/shared/enums/string/firehub.Compare.php
+++ b/src/shared/enums/string/firehub.Compare.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\String;
diff --git a/src/shared/enums/string/firehub.Encoding.php b/src/shared/enums/string/firehub.Encoding.php
index 8528ab42..527dab59 100644
--- a/src/shared/enums/string/firehub.Encoding.php
+++ b/src/shared/enums/string/firehub.Encoding.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\String;
diff --git a/src/shared/enums/string/firehub.Sort.php b/src/shared/enums/string/firehub.Sort.php
index 266b675e..1d9ad9b1 100644
--- a/src/shared/enums/string/firehub.Sort.php
+++ b/src/shared/enums/string/firehub.Sort.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\String;
diff --git a/src/shared/enums/systemruntime/firehub.IniAccessLevel.php b/src/shared/enums/systemruntime/firehub.IniAccessLevel.php
index 2a297513..9fa76920 100644
--- a/src/shared/enums/systemruntime/firehub.IniAccessLevel.php
+++ b/src/shared/enums/systemruntime/firehub.IniAccessLevel.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\SystemRuntime;
diff --git a/src/shared/enums/systemruntime/firehub.PhpExtension.php b/src/shared/enums/systemruntime/firehub.PhpExtension.php
index 0edff313..e9403946 100644
--- a/src/shared/enums/systemruntime/firehub.PhpExtension.php
+++ b/src/shared/enums/systemruntime/firehub.PhpExtension.php
@@ -9,8 +9,6 @@
*
* @php-version 8.1
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared\Enums\SystemRuntime;
diff --git a/src/shared/firehub.ValueObject.php b/src/shared/firehub.ValueObject.php
index fdf9918a..542bc9de 100644
--- a/src/shared/firehub.ValueObject.php
+++ b/src/shared/firehub.ValueObject.php
@@ -9,13 +9,11 @@
*
* @php-version 8.2
* @package Core\Shared
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Shared;
-use FireHub\Core\Throwable\Error\LowLevel\InvalidValueObjectError;
+use FireHub\Core\Throwable\Error\ValueObject\InvalidValueObjectError;
/**
* ### Base Value Object
@@ -64,7 +62,7 @@ public function equals (self $other):bool {
* Exception message.
*
*
- * @throws \FireHub\Core\Throwable\Error\LowLevel\InvalidValueObjectError If the condition is not met.
+ * @throws \FireHub\Core\Throwable\Error\ValueObject\InvalidValueObjectError If the condition is not met.
*
* @return void
*/
diff --git a/src/shared/type/Maybe.php b/src/shared/type/Maybe.php
new file mode 100644
index 00000000..f6db7ab0
--- /dev/null
+++ b/src/shared/type/Maybe.php
@@ -0,0 +1,158 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.2
+ * @package Core\Shared
+ */
+
+namespace FireHub\Core\Shared\Type;
+
+use FireHub\Core\Throwable\Exception\Shared\Type\NoValueException;
+
+/**
+ * ### Optional Value Container (Maybe Type)
+ *
+ * Represents a computation result that may or may not contain a value.
+ * This abstraction explicitly encodes the presence or absence of a value, removing ambiguity between "null as
+ * value" and "null as state".
+ *
+ * The Maybe type is used as a safe alternative to nullable returns in Storage, Data Structure, and Application
+ * layers where value existence must be explicitly expressed.
+ * @since 1.0.0
+ *
+ * @template TValue
+ */
+final readonly class Maybe {
+
+ /**
+ * ### Constructor
+ * @since 1.0.0
+ *
+ * @param bool $hasValue
+ * Indicates whether a value is present.
+ *
+ * @param null|TValue $value [optional]
+ * Optional stored value (can be null if explicitly set via `some()`).
+ *
+ *
+ * @return void
+ */
+ private function __construct(
+ private bool $hasValue,
+ private mixed $value = null
+ ) {}
+
+ /**
+ * ### Create an Empty Maybe Instance
+ *
+ * Creates a Maybe instance representing the absence of a value.
+ * This state explicitly indicates that no value is present and is distinct from a null value.
+ * @since 1.0.0
+ *
+ * @return self Empty Maybe instance.
+ */
+ public static function none ():self {
+
+ return new self(false);
+
+ }
+
+ /**
+ * ### Create a Maybe Instance With a Value
+ *
+ * Wraps a value into a Maybe container, explicitly marking it as present.
+ * The value may be null, but will still be considered a valid present state.
+ * @since 1.0.0
+ *
+ * @template TSomeValue
+ *
+ * @param TSomeValue $value
+ * The value to wrap.
+ *
+ *
+ * @return self Maybe instance containing a value.
+ */
+ public static function some (mixed $value):self {
+
+ return new self(true, $value);
+
+ }
+
+ /**
+ * ### Check Value Presence
+ *
+ * Determines whether this Maybe instance contains a value.
+ * Returns true even if the stored value is null, as presence is independent of value content.
+ * @since 1.0.0
+ *
+ * @return bool True if a value is present, false otherwise.
+ */
+ public function has ():bool {
+
+ return $this->hasValue;
+
+ }
+
+ /**
+ * ### Check Value Absence
+ *
+ * Determines whether this Maybe instance does not contain a value.
+ * This is the inverse of `has()`.
+ * @since 1.0.0
+ *
+ * @return bool True if no value is present, false otherwise.
+ */
+ public function isEmpty ():bool {
+
+ return !$this->hasValue;
+
+ }
+
+ /**
+ * ### Retrieve Wrapped Value
+ *
+ * Returns the stored value if present.
+ * Throws an exception if no value exists in this Maybe instance.
+ * @since 1.0.0
+ *
+ * @throws \FireHub\Core\Throwable\Exception\Shared\Type\NoValueException If no value is present.
+ *
+ * @return TValue The wrapped value.
+ */
+ public function get ():mixed {
+
+ if (!$this->hasValue) throw new NoValueException;
+
+ /** @var TValue */
+ return $this->value;
+
+ }
+
+ /**
+ * ### Unwrap Value or Default
+ *
+ * Returns the wrapped value if present, otherwise returns the provided default value.
+ * This method provides a safe fallback mechanism for empty Maybe instances.
+ * @since 1.0.0
+ *
+ * @template TDefault
+ *
+ * @param TDefault $default
+ * Default value returned if Maybe is empty.
+ *
+ *
+ * @return TValue|TDefault The stored value or the default.
+ */
+ public function unwrap (mixed $default):mixed {
+
+ return $this->hasValue ? $this->value : $default; // @phpstan-ignore return.type
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/support/autoload/classmap.php b/src/support/autoload/classmap.php
index 2c74d308..3344c1a1 100644
--- a/src/support/autoload/classmap.php
+++ b/src/support/autoload/classmap.php
@@ -12,8 +12,6 @@
*
* @php-version 7.0
* @package Core\Support
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Support\Autoload;
@@ -31,9 +29,21 @@
return [
\FireHub\Core\Domain\Autoload\Handle::class => __DIR__.'/../../domain/autoload/firehub.Handle.php',
\FireHub\Core\FireHub::class => __DIR__.'/../../firehub.FireHub.php',
+ \FireHub\Core\Shared\Contracts\ArrayConvertable::class => __DIR__.'/../../shared/contracts/firehub.ArrayConvertable.php',
+ \FireHub\Core\Shared\Contracts\Arrayable::class => __DIR__.'/../../shared/contracts/firehub.Arrayable.php',
+ \FireHub\Core\Shared\Contracts\Countable::class => __DIR__.'/../../shared/contracts/firehub.Countable.php',
+ \FireHub\Core\Shared\Contracts\DataTransferObject::class => __DIR__.'/../../shared/contracts/firehub.DataTransferObject.php',
+ \FireHub\Core\Shared\Contracts\Iterator::class => __DIR__.'/../../shared/contracts/firehub.Iterator.php',
+ \FireHub\Core\Shared\Contracts\IteratorAggregate::class => __DIR__.'/../../shared/contracts/firehub.IteratorAggregate.php',
+ \FireHub\Core\Shared\Contracts\JsonSerializable::class => __DIR__.'/../../shared/contracts/firehub.JsonSerializable.php',
+ \FireHub\Core\Shared\Contracts\JsonSerializableConvertable::class => __DIR__.'/../../shared/contracts/firehub.JsonSerializableConvertable.php',
+ \FireHub\Core\Shared\Contracts\Magic\Serializable::class => __DIR__.'/../../shared/contracts/magic/firehub.Serializable.php',
+ \FireHub\Core\Shared\Contracts\Magic\SerializableConvertable::class => __DIR__.'/../../shared/contracts/magic/firehub.SerializableConvertable.php',
\FireHub\Core\Shared\Contracts\Magic\Stringable::class => __DIR__.'/../../shared/contracts/magic/firehub.Stringable.php',
\FireHub\Core\Shared\Contracts\Throwable::class => __DIR__.'/../../shared/contracts/firehub.Throwable.php',
+ \FireHub\Core\Shared\Contracts\Traversable::class => __DIR__.'/../../shared/contracts/firehub.Traversable.php',
\FireHub\Core\Shared\Enums\Comparison::class => __DIR__.'/../../shared/enums/firehub.Comparison.php',
+ \FireHub\Core\Shared\Enums\ControlFlow\Signal::class => __DIR__.'/../../shared/enums/controlflow/firehub.Signal.php',
\FireHub\Core\Shared\Enums\Data\Category::class => __DIR__.'/../../shared/enums/data/firehub.Category.php',
\FireHub\Core\Shared\Enums\Data\ResourceType::class => __DIR__.'/../../shared/enums/data/firehub.ResourceType.php',
\FireHub\Core\Shared\Enums\Data\Type::class => __DIR__.'/../../shared/enums/data/firehub.Type.php',
@@ -45,6 +55,7 @@
\FireHub\Core\Shared\Enums\Json\Flag\Encode::class => __DIR__.'/../../shared/enums/json/flag/firehub.Encode.php',
\FireHub\Core\Shared\Enums\Json\Flag\Error::class => __DIR__.'/../../shared/enums/json/flag/firehub.Error.php',
\FireHub\Core\Shared\Enums\Json\Flag\Validate::class => __DIR__.'/../../shared/enums/json/flag/firehub.Validate.php',
+ \FireHub\Core\Shared\Enums\MutationOutcome::class => __DIR__.'/../../shared/enums/firehub.MutationOutcome.php',
\FireHub\Core\Shared\Enums\Number\LogBase::class => __DIR__.'/../../shared/enums/number/firehub.LogBase.php',
\FireHub\Core\Shared\Enums\Number\Round::class => __DIR__.'/../../shared/enums/number/firehub.Round.php',
\FireHub\Core\Shared\Enums\Order::class => __DIR__.'/../../shared/enums/firehub.Order.php',
@@ -57,6 +68,7 @@
\FireHub\Core\Shared\Enums\String\Sort::class => __DIR__.'/../../shared/enums/string/firehub.Sort.php',
\FireHub\Core\Shared\Enums\SystemRuntime\IniAccessLevel::class => __DIR__.'/../../shared/enums/systemruntime/firehub.IniAccessLevel.php',
\FireHub\Core\Shared\Enums\SystemRuntime\PhpExtension::class => __DIR__.'/../../shared/enums/systemruntime/firehub.PhpExtension.php',
+ \FireHub\Core\Shared\Type\Maybe::class => __DIR__.'/../../shared/type/Maybe.php',
\FireHub\Core\Shared\ValueObject::class => __DIR__.'/../../shared/firehub.ValueObject.php',
\FireHub\Core\Support\Autoload::class => __DIR__.'/../../support/firehub.Autoload.php',
\FireHub\Core\Support\Autoload\Loader::class => __DIR__.'/../../support/autoload/firehub.Loader.php',
@@ -68,6 +80,64 @@
\FireHub\Core\Support\Bootstrap\Bootloader\RegisterConstants::class => __DIR__.'/../../support/bootstrap/bootloader/firehub.RegisterConstants.php',
\FireHub\Core\Support\Bootstrap\Bootloader\RegisterHelpers::class => __DIR__.'/../../support/bootstrap/bootloader/firehub.RegisterHelpers.php',
\FireHub\Core\Support\Bootstrap\FireHubConfigurator::class => __DIR__.'/../../support/bootstrap/firehub.FireHubConfigurator.php',
+ \FireHub\Core\Support\Contracts\DataStructure::class => __DIR__.'/../../support/contracts/firehub.DataStructure.php',
+ \FireHub\Core\Support\DataStructure\Abstraction\Collection::class => __DIR__.'/../../support/datastructure/abstraction/firehub.Collection.php',
+ \FireHub\Core\Support\DataStructure\Capability\Copyable::class => __DIR__.'/../../support/datastructure/capability/firehub.Copyable.php',
+ \FireHub\Core\Support\DataStructure\Capability\Countable::class => __DIR__.'/../../support/datastructure/capability/firehub.Countable.php',
+ \FireHub\Core\Support\DataStructure\Capability\Enumerable::class => __DIR__.'/../../support/datastructure/capability/firehub.Enumerable.php',
+ \FireHub\Core\Support\DataStructure\Capability\Forkable::class => __DIR__.'/../../support/datastructure/capability/firehub.Forkable.php',
+ \FireHub\Core\Support\DataStructure\Capability\Freezable::class => __DIR__.'/../../support/datastructure/capability/firehub.Freezable.php',
+ \FireHub\Core\Support\DataStructure\Capability\Rebuildable::class => __DIR__.'/../../support/datastructure/capability/firehub.Rebuildable.php',
+ \FireHub\Core\Support\DataStructure\Capability\Rehydratable::class => __DIR__.'/../../support/datastructure/capability/firehub.Rehydratable.php',
+ \FireHub\Core\Support\DataStructure\Capability\Snapshotable::class => __DIR__.'/../../support/datastructure/capability/firehub.Snapshotable.php',
+ \FireHub\Core\Support\DataStructure\DTO\DehydratedState::class => __DIR__.'/../../support/datastructure/dto/firehub.DehydratedState.php',
+ \FireHub\Core\Support\DataStructure\DTO\StateHeader::class => __DIR__.'/../../support/datastructure/dto/firehub.StateHeader.php',
+ \FireHub\Core\Support\DataStructure\Runtime\HasCopyOnWriteState::class => __DIR__.'/../../support/datastructure/runtime/firehub.HasCopyOnWriteState.php',
+ \FireHub\Core\Support\DataStructure\Runtime\HasFreezeState::class => __DIR__.'/../../support/datastructure/runtime/firehub.HasFreezeState.php',
+ \FireHub\Core\Support\DataStructure\Runtime\StructureState::class => __DIR__.'/../../support/datastructure/runtime/firehub.StructureState.php',
+ \FireHub\Core\Support\DataStructure\Storage::class => __DIR__.'/../../support/datastructure/interface.Storage.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\BackInsertion::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.BackInsertion.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\BackMutation::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.BackMutation.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\BackRemoval::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.BackRemoval.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\Cloneable::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.Cloneable.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\Convertible::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.Convertible.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\CyclicTraversal::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.CyclicTraversal.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\DequeMutation::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.DequeMutation.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\FrontInsertion::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.FrontInsertion.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\FrontMutation::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.FrontMutation.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\FrontRemoval::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.FrontRemoval.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\IndexAccess::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.IndexAccess.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\IndexMutation::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.IndexMutation.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\KeyAccess::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.KeyAccess.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\KeyMutation::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.KeyMutation.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\LinearBoundaryAccess::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.LinearBoundaryAccess.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\NodeAccess::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.NodeAccess.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\NodeBidirectionalInsert::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.NodeBidirectionalInsert.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\NodeInsertAfter::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.NodeInsertAfter.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\NodeInsertBefore::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.NodeInsertBefore.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\NodeMutation::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.NodeMutation.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\NodeRemoval::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.NodeRemoval.php',
+ \FireHub\Core\Support\DataStructure\Storage\Capability\StorageMetricsAware::class => __DIR__.'/../../support/datastructure/storage/capability/firehub.StorageMetricsAware.php',
+ \FireHub\Core\Support\DataStructure\Storage\Engine\ArrHashEngine::class => __DIR__.'/../../support/datastructure/storage/engine/firehub.ArrHashEngine.php',
+ \FireHub\Core\Support\DataStructure\Storage\GeneratorStorage::class => __DIR__.'/../../support/datastructure/storage/firehub.GeneratorStorage.php',
+ \FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle::class => __DIR__.'/../../support/datastructure/storage/handle/firehub.NodeHandle.php',
+ \FireHub\Core\Support\DataStructure\Storage\HashEngine::class => __DIR__.'/../../support/datastructure/storage/firehub.HashEngine.php',
+ \FireHub\Core\Support\DataStructure\Storage\HashStorage::class => __DIR__.'/../../support/datastructure/storage/firehub.HashStorage.php',
+ \FireHub\Core\Support\DataStructure\Storage\Initialization\GeneratorStorageInitializer::class => __DIR__.'/../../support/datastructure/storage/initialization/firehub.GeneratorStorageInitializer.php',
+ \FireHub\Core\Support\DataStructure\Storage\Initialization\ListStorageInitializer::class => __DIR__.'/../../support/datastructure/storage/initialization/firehub.ListStorageInitializer.php',
+ \FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy\GeneratorCallbackInitializer::class => __DIR__.'/../../support/datastructure/storage/initialization/strategy/firehub.GeneratorCallbackInitializer.php',
+ \FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy\ListCallbackInitializer::class => __DIR__.'/../../support/datastructure/storage/initialization/strategy/firehub.ListCallbackInitializer.php',
+ \FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy\ListFillInitializer::class => __DIR__.'/../../support/datastructure/storage/initialization/strategy/firehub.ListFillInitializer.php',
+ \FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy\ListRangeInitializer::class => __DIR__.'/../../support/datastructure/storage/initialization/strategy/firehub.ListRangeInitializer.php',
+ \FireHub\Core\Support\DataStructure\Storage\ListStorage::class => __DIR__.'/../../support/datastructure/storage/firehub.ListStorage.php',
+ \FireHub\Core\Support\DataStructure\Storage\Node::class => __DIR__.'/../../support/datastructure/storage/firehub.Node.php',
+ \FireHub\Core\Support\DataStructure\Structure\Map::class => __DIR__.'/../../support/datastructure/structure/firehub.Map.php',
+ \FireHub\Core\Support\DataStructure\Structure\Snapshot\MapSnapshot::class => __DIR__.'/../../support/datastructure/structure/snapshot/firehub.MapSnapshot.php',
+ \FireHub\Core\Support\DataStructure\Structure\Snapshot\Snapshot::class => __DIR__.'/../../support/datastructure/structure/snapshot/firehub.Snapshot.php',
+ \FireHub\Core\Support\DataStructure\Structure\Snapshot\VectorSnapshot::class => __DIR__.'/../../support/datastructure/structure/snapshot/firehub.VectorSnapshot.php',
+ \FireHub\Core\Support\DataStructure\Structure\Vector::class => __DIR__.'/../../support/datastructure/structure/firehub.Vector.php',
+ \FireHub\Core\Support\DataStructure\Type\Associative::class => __DIR__.'/../../support/datastructure/type/firehub.Associative.php',
+ \FireHub\Core\Support\DataStructure\Type\Linear::class => __DIR__.'/../../support/datastructure/type/firehub.Linear.php',
\FireHub\Core\Support\LowLevel::class => __DIR__.'/../../support/firehub.LowLevel.php',
\FireHub\Core\Support\LowLevel\Arr::class => __DIR__.'/../../support/lowlevel/firehub.Arr.php',
\FireHub\Core\Support\LowLevel\CharMB::class => __DIR__.'/../../support/lowlevel/firehub.CharMB.php',
@@ -152,7 +222,6 @@
\FireHub\Core\Throwable\Error\LowLevel\FileSystem\SetOwnerError::class => __DIR__.'/../../throwable/error/lowlevel/filesystem/firehub.SetOwnerError.php',
\FireHub\Core\Throwable\Error\LowLevel\FileSystem\SetPermissionsError::class => __DIR__.'/../../throwable/error/lowlevel/filesystem/firehub.SetPermissionsError.php',
\FireHub\Core\Throwable\Error\LowLevel\Func\RegisterTickFailedError::class => __DIR__.'/../../throwable/error/lowlevel/func/firehub.RegisterTickFailedError.php',
- \FireHub\Core\Throwable\Error\LowLevel\InvalidValueObjectError::class => __DIR__.'/../../throwable/error/valueobject/firehub.InvalidValueObjectError.php',
\FireHub\Core\Throwable\Error\LowLevel\Json\DecodeError::class => __DIR__.'/../../throwable/error/lowlevel/json/firehub.DecodeError.php',
\FireHub\Core\Throwable\Error\LowLevel\Json\EncodeError::class => __DIR__.'/../../throwable/error/lowlevel/json/firehub.EncodeError.php',
\FireHub\Core\Throwable\Error\LowLevel\Number\ArithmeticError::class => __DIR__.'/../../throwable/error/lowlevel/number/firehub.ArithmeticError.php',
@@ -175,14 +244,29 @@
\FireHub\Core\Throwable\Error\LowLevel\SystemRuntime\InvalidConfigurationQuantityError::class => __DIR__.'/../../throwable/error/lowlevel/systemruntime/firehub.InvalidConfigurationQuantityError.php',
\FireHub\Core\Throwable\Error\LowLevel\SystemRuntime\InvalidExtensionError::class => __DIR__.'/../../throwable/error/lowlevel/systemruntime/firehub.InvalidExtensionError.php',
\FireHub\Core\Throwable\Error\LowLevel\SystemRuntime\SleepTimeInvalidError::class => __DIR__.'/../../throwable/error/lowlevel/systemruntime/firehub.SleepTimeInvalidError.php',
+ \FireHub\Core\Throwable\Error\ValueObject\InvalidValueObjectError::class => __DIR__.'/../../throwable/error/valueobject/firehub.InvalidValueObjectError.php',
\FireHub\Core\Throwable\Exception::class => __DIR__.'/../../throwable/firehub.Exception.php',
\FireHub\Core\Throwable\ExceptionBuilder::class => __DIR__.'/../../throwable/firehub.ExceptionBuilder.php',
- \FireHub\Core\Throwable\Exception\Bootstrap\FailedToLoadBootloaderException::class => __DIR__.'/../../throwable/exception/bootstrap/firehub.FailedToLoadBootloaderException.php',
- \FireHub\Core\Throwable\Exception\Bootstrap\NotBootloaderException::class => __DIR__.'/../../throwable/exception/bootstrap/firehub.NotBootloaderException.php',
\FireHub\Core\Throwable\Exception\Domain\Autoload\ImplementationException::class => __DIR__.'/../../throwable/exception/domain/autoload/firehub.ImplementationException.php',
\FireHub\Core\Throwable\Exception\Domain\Autoload\InvalidFolderException::class => __DIR__.'/../../throwable/exception/domain/autoload/firehub.InvalidFolderException.php',
\FireHub\Core\Throwable\Exception\Domain\Autoload\InvalidHandleException::class => __DIR__.'/../../throwable/exception/domain/autoload/firehub.InvalidHandleException.php',
\FireHub\Core\Throwable\Exception\Domain\Autoload\InvalidNamespaceException::class => __DIR__.'/../../throwable/exception/domain/autoload/firehub.InvalidNamespaceException.php',
+ \FireHub\Core\Throwable\Exception\Shared\Type\NoValueException::class => __DIR__.'/../../throwable/exception/shared/type/firehub.NoValueException.php',
+ \FireHub\Core\Throwable\Exception\Support\Bootstrap\FailedToLoadBootloaderException::class => __DIR__.'/../../throwable/exception/support/bootstrap/firehub.FailedToLoadBootloaderException.php',
+ \FireHub\Core\Throwable\Exception\Support\Bootstrap\NotBootloaderException::class => __DIR__.'/../../throwable/exception/support/bootstrap/firehub.NotBootloaderException.php',
+ \FireHub\Core\Throwable\Exception\Support\DataStructure\EmptyDataStructureException::class => __DIR__.'/../../throwable/exception/support/datastructure/firehub.EmptyDataStructureException.php',
+ \FireHub\Core\Throwable\Exception\Support\DataStructure\FrozenDataStructureException::class => __DIR__.'/../../throwable/exception/support/datastructure/firehub.FrozenDataStructureException.php',
+ \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidBufferException::class => __DIR__.'/../../throwable/exception/support/datastructure/firehub.InvalidBufferException.php',
+ \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidCowStateException::class => __DIR__.'/../../throwable/exception/support/datastructure/firehub.InvalidCowStateException.php',
+ \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidDataStructureException::class => __DIR__.'/../../throwable/exception/support/datastructure/firehub.InvalidDataStructureException.php',
+ \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidEngineException::class => __DIR__.'/../../throwable/exception/support/datastructure/firehub.InvalidEngineException.php',
+ \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidKeyException::class => __DIR__.'/../../throwable/exception/support/datastructure/firehub.InvalidKeyException.php',
+ \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidStorageException::class => __DIR__.'/../../throwable/exception/support/datastructure/firehub.InvalidStorageException.php',
+ \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidValueException::class => __DIR__.'/../../throwable/exception/support/datastructure/firehub.InvalidValueException.php',
+ \FireHub\Core\Throwable\Exception\Support\DataStructure\NodeOwnershipException::class => __DIR__.'/../../throwable/exception/support/datastructure/firehub.NodeOwnershipException.php',
+ \FireHub\Core\Throwable\Exception\Support\DataStructure\OutOfBoundsException::class => __DIR__.'/../../throwable/exception/support/datastructure/firehub.OutOfBoundsException.php',
+ \FireHub\Core\Throwable\Exception\Support\DataStructure\SizeException::class => __DIR__.'/../../throwable/exception/support/datastructure/firehub.SizeException.php',
+ \FireHub\Core\Throwable\Exception\Support\DataStructure\WrongReturnTypeException::class => __DIR__.'/../../throwable/exception/support/datastructure/firehub.WrongReturnTypeException.php',
\FireHub\Core\Throwable\Throwable::class => __DIR__.'/../../throwable/firehub.Throwable.php',
\FireHub\Core\Throwable\ValueObject\Code::class => __DIR__.'/../../throwable/valueobject/firehub.Code.php',
];
\ No newline at end of file
diff --git a/src/support/autoload/firehub.Loader.php b/src/support/autoload/firehub.Loader.php
index d280a8c1..c7acaef1 100644
--- a/src/support/autoload/firehub.Loader.php
+++ b/src/support/autoload/firehub.Loader.php
@@ -9,8 +9,6 @@
*
* @php-version 7.0
* @package Core\Support
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Support\Autoload;
diff --git a/src/support/autoload/loader/firehub.Classmap.php b/src/support/autoload/loader/firehub.Classmap.php
index e89dfe0b..8b282ee2 100644
--- a/src/support/autoload/loader/firehub.Classmap.php
+++ b/src/support/autoload/loader/firehub.Classmap.php
@@ -9,8 +9,6 @@
*
* @php-version 7.0
* @package Core\Support
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Support\Autoload\Loader;
diff --git a/src/support/autoload/loader/firehub.CompiledClassmap.php b/src/support/autoload/loader/firehub.CompiledClassmap.php
index 3dd11127..85c60654 100644
--- a/src/support/autoload/loader/firehub.CompiledClassmap.php
+++ b/src/support/autoload/loader/firehub.CompiledClassmap.php
@@ -9,8 +9,6 @@
*
* @php-version 7.0
* @package Core\Support
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Support\Autoload\Loader;
@@ -50,6 +48,46 @@ public function __invoke (string $class):void {
require __DIR__.'/../../../firehub.FireHub.php';
return;
+ case \FireHub\Core\Shared\Contracts\ArrayConvertable::class:
+ require __DIR__.'/../../../shared/contracts/firehub.ArrayConvertable.php';
+ return;
+
+ case \FireHub\Core\Shared\Contracts\Arrayable::class:
+ require __DIR__.'/../../../shared/contracts/firehub.Arrayable.php';
+ return;
+
+ case \FireHub\Core\Shared\Contracts\Countable::class:
+ require __DIR__.'/../../../shared/contracts/firehub.Countable.php';
+ return;
+
+ case \FireHub\Core\Shared\Contracts\DataTransferObject::class:
+ require __DIR__.'/../../../shared/contracts/firehub.DataTransferObject.php';
+ return;
+
+ case \FireHub\Core\Shared\Contracts\Iterator::class:
+ require __DIR__.'/../../../shared/contracts/firehub.Iterator.php';
+ return;
+
+ case \FireHub\Core\Shared\Contracts\IteratorAggregate::class:
+ require __DIR__.'/../../../shared/contracts/firehub.IteratorAggregate.php';
+ return;
+
+ case \FireHub\Core\Shared\Contracts\JsonSerializable::class:
+ require __DIR__.'/../../../shared/contracts/firehub.JsonSerializable.php';
+ return;
+
+ case \FireHub\Core\Shared\Contracts\JsonSerializableConvertable::class:
+ require __DIR__.'/../../../shared/contracts/firehub.JsonSerializableConvertable.php';
+ return;
+
+ case \FireHub\Core\Shared\Contracts\Magic\Serializable::class:
+ require __DIR__.'/../../../shared/contracts/magic/firehub.Serializable.php';
+ return;
+
+ case \FireHub\Core\Shared\Contracts\Magic\SerializableConvertable::class:
+ require __DIR__.'/../../../shared/contracts/magic/firehub.SerializableConvertable.php';
+ return;
+
case \FireHub\Core\Shared\Contracts\Magic\Stringable::class:
require __DIR__.'/../../../shared/contracts/magic/firehub.Stringable.php';
return;
@@ -58,10 +96,18 @@ public function __invoke (string $class):void {
require __DIR__.'/../../../shared/contracts/firehub.Throwable.php';
return;
+ case \FireHub\Core\Shared\Contracts\Traversable::class:
+ require __DIR__.'/../../../shared/contracts/firehub.Traversable.php';
+ return;
+
case \FireHub\Core\Shared\Enums\Comparison::class:
require __DIR__.'/../../../shared/enums/firehub.Comparison.php';
return;
+ case \FireHub\Core\Shared\Enums\ControlFlow\Signal::class:
+ require __DIR__.'/../../../shared/enums/controlflow/firehub.Signal.php';
+ return;
+
case \FireHub\Core\Shared\Enums\Data\Category::class:
require __DIR__.'/../../../shared/enums/data/firehub.Category.php';
return;
@@ -106,6 +152,10 @@ public function __invoke (string $class):void {
require __DIR__.'/../../../shared/enums/json/flag/firehub.Validate.php';
return;
+ case \FireHub\Core\Shared\Enums\MutationOutcome::class:
+ require __DIR__.'/../../../shared/enums/firehub.MutationOutcome.php';
+ return;
+
case \FireHub\Core\Shared\Enums\Number\LogBase::class:
require __DIR__.'/../../../shared/enums/number/firehub.LogBase.php';
return;
@@ -154,6 +204,10 @@ public function __invoke (string $class):void {
require __DIR__.'/../../../shared/enums/systemruntime/firehub.PhpExtension.php';
return;
+ case \FireHub\Core\Shared\Type\Maybe::class:
+ require __DIR__.'/../../../shared/type/Maybe.php';
+ return;
+
case \FireHub\Core\Shared\ValueObject::class:
require __DIR__.'/../../../shared/firehub.ValueObject.php';
return;
@@ -198,6 +252,238 @@ public function __invoke (string $class):void {
require __DIR__.'/../../../support/bootstrap/firehub.FireHubConfigurator.php';
return;
+ case \FireHub\Core\Support\Contracts\DataStructure::class:
+ require __DIR__.'/../../../support/contracts/firehub.DataStructure.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Abstraction\Collection::class:
+ require __DIR__.'/../../../support/datastructure/abstraction/firehub.Collection.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Capability\Copyable::class:
+ require __DIR__.'/../../../support/datastructure/capability/firehub.Copyable.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Capability\Countable::class:
+ require __DIR__.'/../../../support/datastructure/capability/firehub.Countable.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Capability\Enumerable::class:
+ require __DIR__.'/../../../support/datastructure/capability/firehub.Enumerable.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Capability\Forkable::class:
+ require __DIR__.'/../../../support/datastructure/capability/firehub.Forkable.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Capability\Freezable::class:
+ require __DIR__.'/../../../support/datastructure/capability/firehub.Freezable.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Capability\Rebuildable::class:
+ require __DIR__.'/../../../support/datastructure/capability/firehub.Rebuildable.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Capability\Rehydratable::class:
+ require __DIR__.'/../../../support/datastructure/capability/firehub.Rehydratable.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Capability\Snapshotable::class:
+ require __DIR__.'/../../../support/datastructure/capability/firehub.Snapshotable.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\DTO\DehydratedState::class:
+ require __DIR__.'/../../../support/datastructure/dto/firehub.DehydratedState.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\DTO\StateHeader::class:
+ require __DIR__.'/../../../support/datastructure/dto/firehub.StateHeader.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Runtime\HasCopyOnWriteState::class:
+ require __DIR__.'/../../../support/datastructure/runtime/firehub.HasCopyOnWriteState.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Runtime\HasFreezeState::class:
+ require __DIR__.'/../../../support/datastructure/runtime/firehub.HasFreezeState.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Runtime\StructureState::class:
+ require __DIR__.'/../../../support/datastructure/runtime/firehub.StructureState.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage::class:
+ require __DIR__.'/../../../support/datastructure/interface.Storage.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\BackInsertion::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.BackInsertion.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\BackMutation::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.BackMutation.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\BackRemoval::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.BackRemoval.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\Cloneable::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.Cloneable.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\Convertible::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.Convertible.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\CyclicTraversal::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.CyclicTraversal.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\DequeMutation::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.DequeMutation.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\FrontInsertion::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.FrontInsertion.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\FrontMutation::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.FrontMutation.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\FrontRemoval::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.FrontRemoval.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\IndexAccess::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.IndexAccess.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\IndexMutation::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.IndexMutation.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\KeyAccess::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.KeyAccess.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\KeyMutation::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.KeyMutation.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\LinearBoundaryAccess::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.LinearBoundaryAccess.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\NodeAccess::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.NodeAccess.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\NodeBidirectionalInsert::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.NodeBidirectionalInsert.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\NodeInsertAfter::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.NodeInsertAfter.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\NodeInsertBefore::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.NodeInsertBefore.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\NodeMutation::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.NodeMutation.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\NodeRemoval::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.NodeRemoval.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Capability\StorageMetricsAware::class:
+ require __DIR__.'/../../../support/datastructure/storage/capability/firehub.StorageMetricsAware.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Engine\ArrHashEngine::class:
+ require __DIR__.'/../../../support/datastructure/storage/engine/firehub.ArrHashEngine.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\GeneratorStorage::class:
+ require __DIR__.'/../../../support/datastructure/storage/firehub.GeneratorStorage.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle::class:
+ require __DIR__.'/../../../support/datastructure/storage/handle/firehub.NodeHandle.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\HashEngine::class:
+ require __DIR__.'/../../../support/datastructure/storage/firehub.HashEngine.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\HashStorage::class:
+ require __DIR__.'/../../../support/datastructure/storage/firehub.HashStorage.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Initialization\GeneratorStorageInitializer::class:
+ require __DIR__.'/../../../support/datastructure/storage/initialization/firehub.GeneratorStorageInitializer.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Initialization\ListStorageInitializer::class:
+ require __DIR__.'/../../../support/datastructure/storage/initialization/firehub.ListStorageInitializer.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy\GeneratorCallbackInitializer::class:
+ require __DIR__.'/../../../support/datastructure/storage/initialization/strategy/firehub.GeneratorCallbackInitializer.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy\ListCallbackInitializer::class:
+ require __DIR__.'/../../../support/datastructure/storage/initialization/strategy/firehub.ListCallbackInitializer.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy\ListFillInitializer::class:
+ require __DIR__.'/../../../support/datastructure/storage/initialization/strategy/firehub.ListFillInitializer.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy\ListRangeInitializer::class:
+ require __DIR__.'/../../../support/datastructure/storage/initialization/strategy/firehub.ListRangeInitializer.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\ListStorage::class:
+ require __DIR__.'/../../../support/datastructure/storage/firehub.ListStorage.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Storage\Node::class:
+ require __DIR__.'/../../../support/datastructure/storage/firehub.Node.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Structure\Map::class:
+ require __DIR__.'/../../../support/datastructure/structure/firehub.Map.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Structure\Snapshot\MapSnapshot::class:
+ require __DIR__.'/../../../support/datastructure/structure/snapshot/firehub.MapSnapshot.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Structure\Snapshot\Snapshot::class:
+ require __DIR__.'/../../../support/datastructure/structure/snapshot/firehub.Snapshot.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Structure\Snapshot\VectorSnapshot::class:
+ require __DIR__.'/../../../support/datastructure/structure/snapshot/firehub.VectorSnapshot.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Structure\Vector::class:
+ require __DIR__.'/../../../support/datastructure/structure/firehub.Vector.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Type\Associative::class:
+ require __DIR__.'/../../../support/datastructure/type/firehub.Associative.php';
+ return;
+
+ case \FireHub\Core\Support\DataStructure\Type\Linear::class:
+ require __DIR__.'/../../../support/datastructure/type/firehub.Linear.php';
+ return;
+
case \FireHub\Core\Support\LowLevel::class:
require __DIR__.'/../../../support/firehub.LowLevel.php';
return;
@@ -534,10 +820,6 @@ public function __invoke (string $class):void {
require __DIR__.'/../../../throwable/error/lowlevel/func/firehub.RegisterTickFailedError.php';
return;
- case \FireHub\Core\Throwable\Error\LowLevel\InvalidValueObjectError::class:
- require __DIR__.'/../../../throwable/error/valueobject/firehub.InvalidValueObjectError.php';
- return;
-
case \FireHub\Core\Throwable\Error\LowLevel\Json\DecodeError::class:
require __DIR__.'/../../../throwable/error/lowlevel/json/firehub.DecodeError.php';
return;
@@ -626,6 +908,10 @@ public function __invoke (string $class):void {
require __DIR__.'/../../../throwable/error/lowlevel/systemruntime/firehub.SleepTimeInvalidError.php';
return;
+ case \FireHub\Core\Throwable\Error\ValueObject\InvalidValueObjectError::class:
+ require __DIR__.'/../../../throwable/error/valueobject/firehub.InvalidValueObjectError.php';
+ return;
+
case \FireHub\Core\Throwable\Exception::class:
require __DIR__.'/../../../throwable/firehub.Exception.php';
return;
@@ -634,14 +920,6 @@ public function __invoke (string $class):void {
require __DIR__.'/../../../throwable/firehub.ExceptionBuilder.php';
return;
- case \FireHub\Core\Throwable\Exception\Bootstrap\FailedToLoadBootloaderException::class:
- require __DIR__.'/../../../throwable/exception/bootstrap/firehub.FailedToLoadBootloaderException.php';
- return;
-
- case \FireHub\Core\Throwable\Exception\Bootstrap\NotBootloaderException::class:
- require __DIR__.'/../../../throwable/exception/bootstrap/firehub.NotBootloaderException.php';
- return;
-
case \FireHub\Core\Throwable\Exception\Domain\Autoload\ImplementationException::class:
require __DIR__.'/../../../throwable/exception/domain/autoload/firehub.ImplementationException.php';
return;
@@ -658,6 +936,70 @@ public function __invoke (string $class):void {
require __DIR__.'/../../../throwable/exception/domain/autoload/firehub.InvalidNamespaceException.php';
return;
+ case \FireHub\Core\Throwable\Exception\Shared\Type\NoValueException::class:
+ require __DIR__.'/../../../throwable/exception/shared/type/firehub.NoValueException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\Bootstrap\FailedToLoadBootloaderException::class:
+ require __DIR__.'/../../../throwable/exception/support/bootstrap/firehub.FailedToLoadBootloaderException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\Bootstrap\NotBootloaderException::class:
+ require __DIR__.'/../../../throwable/exception/support/bootstrap/firehub.NotBootloaderException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\DataStructure\EmptyDataStructureException::class:
+ require __DIR__.'/../../../throwable/exception/support/datastructure/firehub.EmptyDataStructureException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\DataStructure\FrozenDataStructureException::class:
+ require __DIR__.'/../../../throwable/exception/support/datastructure/firehub.FrozenDataStructureException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidBufferException::class:
+ require __DIR__.'/../../../throwable/exception/support/datastructure/firehub.InvalidBufferException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidCowStateException::class:
+ require __DIR__.'/../../../throwable/exception/support/datastructure/firehub.InvalidCowStateException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidDataStructureException::class:
+ require __DIR__.'/../../../throwable/exception/support/datastructure/firehub.InvalidDataStructureException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidEngineException::class:
+ require __DIR__.'/../../../throwable/exception/support/datastructure/firehub.InvalidEngineException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidKeyException::class:
+ require __DIR__.'/../../../throwable/exception/support/datastructure/firehub.InvalidKeyException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidStorageException::class:
+ require __DIR__.'/../../../throwable/exception/support/datastructure/firehub.InvalidStorageException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidValueException::class:
+ require __DIR__.'/../../../throwable/exception/support/datastructure/firehub.InvalidValueException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\DataStructure\NodeOwnershipException::class:
+ require __DIR__.'/../../../throwable/exception/support/datastructure/firehub.NodeOwnershipException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\DataStructure\OutOfBoundsException::class:
+ require __DIR__.'/../../../throwable/exception/support/datastructure/firehub.OutOfBoundsException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\DataStructure\SizeException::class:
+ require __DIR__.'/../../../throwable/exception/support/datastructure/firehub.SizeException.php';
+ return;
+
+ case \FireHub\Core\Throwable\Exception\Support\DataStructure\WrongReturnTypeException::class:
+ require __DIR__.'/../../../throwable/exception/support/datastructure/firehub.WrongReturnTypeException.php';
+ return;
+
case \FireHub\Core\Throwable\Throwable::class:
require __DIR__.'/../../../throwable/firehub.Throwable.php';
return;
diff --git a/src/support/autoload/loader/firehub.Resolver.php b/src/support/autoload/loader/firehub.Resolver.php
index f6a9a41d..c43e8032 100644
--- a/src/support/autoload/loader/firehub.Resolver.php
+++ b/src/support/autoload/loader/firehub.Resolver.php
@@ -9,8 +9,6 @@
*
* @php-version 8.2
* @package Core\Support
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Support\Autoload\Loader;
@@ -37,7 +35,7 @@
final class Resolver implements Loader {
/**
- * ### List of namespaces prefixes with its folders
+ * ### List of namespace prefixes with its folders
*
* An associative array where the key is a namespace prefix, and the value is an array of base folders for classes
* in that namespace.
diff --git a/src/support/bootstrap/bootloader/firehub.RegisterAutoloaders.php b/src/support/bootstrap/bootloader/firehub.RegisterAutoloaders.php
index 1534c1eb..6f5a8550 100644
--- a/src/support/bootstrap/bootloader/firehub.RegisterAutoloaders.php
+++ b/src/support/bootstrap/bootloader/firehub.RegisterAutoloaders.php
@@ -9,8 +9,6 @@
*
* @php-version 7.0
* @package Core
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Support\Bootstrap\Bootloader;
diff --git a/src/support/bootstrap/bootloader/firehub.RegisterConstants.php b/src/support/bootstrap/bootloader/firehub.RegisterConstants.php
index 41dc6647..c2750913 100644
--- a/src/support/bootstrap/bootloader/firehub.RegisterConstants.php
+++ b/src/support/bootstrap/bootloader/firehub.RegisterConstants.php
@@ -9,8 +9,6 @@
*
* @php-version 7.0
* @package Core
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Support\Bootstrap\Bootloader;
diff --git a/src/support/bootstrap/bootloader/firehub.RegisterHelpers.php b/src/support/bootstrap/bootloader/firehub.RegisterHelpers.php
index 1c21e05d..22f6583c 100644
--- a/src/support/bootstrap/bootloader/firehub.RegisterHelpers.php
+++ b/src/support/bootstrap/bootloader/firehub.RegisterHelpers.php
@@ -9,8 +9,6 @@
*
* @php-version 7.0
* @package Core
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Support\Bootstrap\Bootloader;
diff --git a/src/support/bootstrap/firehub.Bootloader.php b/src/support/bootstrap/firehub.Bootloader.php
index 0e8395f4..def47dae 100644
--- a/src/support/bootstrap/firehub.Bootloader.php
+++ b/src/support/bootstrap/firehub.Bootloader.php
@@ -9,8 +9,6 @@
*
* @php-version 7.0
* @package Core
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Support\Bootstrap;
diff --git a/src/support/bootstrap/firehub.FireHubConfigurator.php b/src/support/bootstrap/firehub.FireHubConfigurator.php
index 12697ad4..3f842eac 100644
--- a/src/support/bootstrap/firehub.FireHubConfigurator.php
+++ b/src/support/bootstrap/firehub.FireHubConfigurator.php
@@ -9,8 +9,6 @@
*
* @php-version 8.4
* @package Core
- *
- * @version GIT: $Id$ Blob checksum.
*/
namespace FireHub\Core\Support\Bootstrap;
@@ -64,9 +62,10 @@ public function withBootloaders (array $bootloaders):self {
*
* @uses \FireHub\Core\FireHub As return.
*
- * @throws \FireHub\Core\Throwable\Exception\Bootstrap\FailedToLoadBootloaderException If a bootloader fails to
- * load.
- * @throws \FireHub\Core\Throwable\Exception\Bootstrap\NotBootloaderException If a bootloader is not a bootloader.
+ * @throws \FireHub\Core\Throwable\Exception\Support\Bootstrap\FailedToLoadBootloaderException If a bootloader
+ * fails to load.
+ * @throws \FireHub\Core\Throwable\Exception\Support\Bootstrap\NotBootloaderException If a bootloader is not
+ * a bootloader.
*
* @return \FireHub\Core\FireHub New Firehub Framework application.
*/
diff --git a/src/support/contracts/firehub.DataStructure.php b/src/support/contracts/firehub.DataStructure.php
new file mode 100644
index 00000000..b0751e83
--- /dev/null
+++ b/src/support/contracts/firehub.DataStructure.php
@@ -0,0 +1,31 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\Contracts;
+
+/**
+ * ### Data structure Contract
+ *
+ * Represents the root abstraction for all data structures within the system.
+ * A data structure defines the semantic interpretation and usage model of data, independent of its underlying storage
+ * mechanism.
+ * It serves as a type identity and architectural boundary, enabling consistent classification, composition, and
+ * interaction across different structural paradigms.
+ * This interface does not define behavior or operations but establishes a common contract for all structures that
+ * organize and expose data meaningfully.
+ * @since 1.0.0
+ *
+ * @template TKey
+ * @template TValue
+ */
+interface DataStructure {}
\ No newline at end of file
diff --git a/src/support/datastructure/abstraction/firehub.Collection.php b/src/support/datastructure/abstraction/firehub.Collection.php
new file mode 100644
index 00000000..f3657d37
--- /dev/null
+++ b/src/support/datastructure/abstraction/firehub.Collection.php
@@ -0,0 +1,31 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Abstraction;
+
+use FireHub\Core\Support\DataStructure\Capability\Enumerable;
+
+/**
+ * ### Collection Data Structure
+ *
+ * Represents an enumerable and structured group of elements that provides consistent storage, traversal, access, and
+ * optional mutation semantics. Collections serve as the foundational abstraction for linear, associative, and
+ * set-based data structures while maintaining a unified iteration model over their contained values.
+ * @since 1.0.0
+ *
+ * @template TKey
+ * @template TValue
+ *
+ * @extends \FireHub\Core\Support\DataStructure\Capability\Enumerable
+ */
+interface Collection extends Enumerable {}
\ No newline at end of file
diff --git a/src/support/datastructure/capability/firehub.Copyable.php b/src/support/datastructure/capability/firehub.Copyable.php
new file mode 100644
index 00000000..61a1a90a
--- /dev/null
+++ b/src/support/datastructure/capability/firehub.Copyable.php
@@ -0,0 +1,35 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Capability;
+
+/**
+ * ### Copyable Data Structure
+ *
+ * Provides a full deep copy of the data structure with no shared state.
+ * Unlike fork, this operation guarantees full isolation.
+ * @since 1.0.0
+ */
+interface Copyable {
+
+ /**
+ * ### Create deep independent copy
+ *
+ * Returns a completely isolated instance with duplicated internal state.
+ * @since 1.0.0
+ *
+ * @return static Deep independent copy.
+ */
+ public function copy ():static;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/capability/firehub.Countable.php b/src/support/datastructure/capability/firehub.Countable.php
new file mode 100644
index 00000000..e8a1d2d0
--- /dev/null
+++ b/src/support/datastructure/capability/firehub.Countable.php
@@ -0,0 +1,40 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Capability;
+
+/**
+ * ### Enumerable Data Structure Capability
+ *
+ * Defines a contract for data structures that maintain a measurable logical element count. This capability ensures
+ * that a structure can expose the number of contained elements in a consistent, domain-specific manner, independent of
+ * its underlying storage implementation. It applies only to materialized data structures where element cardinality
+ * is well-defined, enabling predictable size semantics across data structures.
+ * @since 1.0.0
+ */
+interface Countable {
+
+ /**
+ * ### Element Count Retrieval
+ *
+ * Returns the total number of logically stored elements within the data structure. This value represents the
+ * current cardinality of the structure in its abstract form and is independent of the underlying storage
+ * implementation or memory layout. It is defined only for materialized data structures where element count is
+ * well-defined and stable.
+ * @since 1.0.0
+ *
+ * @return non-negative-int Total number of logically stored elements in the structure.
+ */
+ public function count ():int;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/capability/firehub.Enumerable.php b/src/support/datastructure/capability/firehub.Enumerable.php
new file mode 100644
index 00000000..bc29182e
--- /dev/null
+++ b/src/support/datastructure/capability/firehub.Enumerable.php
@@ -0,0 +1,31 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Capability;
+
+use FireHub\Core\Shared\Contracts\IteratorAggregate;
+
+/**
+ * ### Enumerable Data Structure Capability
+ *
+ * Represents a data structure that exposes a unified iteration contract, enabling traversal of its elements in a
+ * sequential manner via an external or internal iterator. This capability does not define storage behavior or mutation
+ * rules but provides a consistent way to traverse underlying elements regardless of the structure type.
+ * @since 1.0.0
+ *
+ * @template TKey
+ * @template TValue
+ *
+ * @extends \FireHub\Core\Shared\Contracts\IteratorAggregate
+ */
+interface Enumerable extends IteratorAggregate {}
\ No newline at end of file
diff --git a/src/support/datastructure/capability/firehub.Forkable.php b/src/support/datastructure/capability/firehub.Forkable.php
new file mode 100644
index 00000000..90413ee8
--- /dev/null
+++ b/src/support/datastructure/capability/firehub.Forkable.php
@@ -0,0 +1,36 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Capability;
+
+/**
+ * ### Forkable Data Structure
+ *
+ * Provides a lightweight branching mechanism where the structure shares underlying state until a write operation
+ * forces a copy-on-write detach.
+ * This enables efficient snapshot-like workflows with minimal memory overhead.
+ * @since 1.0.0
+ */
+interface Forkable {
+
+ /**
+ * ### Create a shared state fork
+ *
+ * Creates a new instance that shares underlying storage/state with the current instance until a mutation occurs.
+ * @since 1.0.0
+ *
+ * @return static Shared state fork.
+ */
+ public function fork ():static;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/capability/firehub.Freezable.php b/src/support/datastructure/capability/firehub.Freezable.php
new file mode 100644
index 00000000..70bf7a83
--- /dev/null
+++ b/src/support/datastructure/capability/firehub.Freezable.php
@@ -0,0 +1,35 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Capability;
+
+/**
+ * ### Freezable Data Structure
+ *
+ * Allows a data structure to be permanently or temporarily locked from any mutation operations.
+ * Once frozen, all write operations must be rejected.
+ * @since 1.0.0
+ */
+interface Freezable {
+
+ /**
+ * ### Freeze structure (make immutable)
+ *
+ * Prevents any further modifications to the structure state.
+ * @since 1.0.0
+ *
+ * @return void
+ */
+ public function freeze ():void;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/capability/firehub.Rebuildable.php b/src/support/datastructure/capability/firehub.Rebuildable.php
new file mode 100644
index 00000000..8035b040
--- /dev/null
+++ b/src/support/datastructure/capability/firehub.Rebuildable.php
@@ -0,0 +1,67 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Capability;
+
+/**
+ * ### Rebuildable Capability
+ *
+ * Defines the ability to rebuild a data structure using the same semantic structure while allowing internal
+ * implementation changes.
+ *
+ * Rebuilding preserves:
+ * - Structural meaning
+ * - Ordering semantics
+ * - Key/value relationships
+ * - Behavioral contracts
+ *
+ * But may change:
+ * - Storage backend
+ * - Memory layout
+ * - Internal optimization strategy
+ * - Capacity model
+ *
+ * Rebuild is considered an implementation-level lifecycle operation.
+ * @since 1.0.0
+ *
+ * @template TStorage of \FireHub\Core\Support\DataStructure\Storage
+ */
+interface Rebuildable {
+
+ /**
+ * ### Rebuild structure using a different implementation strategy
+ *
+ * Reconstructs the same logical structure using another storage backend, memory strategy, or internal
+ * optimization model while preserving the exact semantic behavior of the original structure.
+ *
+ * This operation MUST NOT change:
+ * - Structural category
+ * - Public semantics
+ * - Key/value meaning
+ * - Traversal behavior
+ *
+ * It MAY change:
+ * - Runtime performance characteristics
+ * - Storage representation
+ * - Internal indexing layout
+ * @since 1.0.0
+ *
+ * @param class-string $storage
+ * Target storage implementation.
+ *
+ *
+ * @return static Rebuilt structure instance.
+ */
+ public function rebuild (string $storage):static;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/capability/firehub.Rehydratable.php b/src/support/datastructure/capability/firehub.Rehydratable.php
new file mode 100644
index 00000000..10abcc4d
--- /dev/null
+++ b/src/support/datastructure/capability/firehub.Rehydratable.php
@@ -0,0 +1,73 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Capability;
+
+use FireHub\Core\Support\DataStructure\DTO\DehydratedState;
+
+/**
+ * ### Rehydratable Capability
+ *
+ * Defines a reversible lifecycle contract for objects that can be converted into a canonical dehydrated state and
+ * reconstructed back into their original form.
+ *
+ * This contract guarantees that a data structure can:
+ * - Be safely serialized into a deterministic state representation
+ * - Be fully restored without loss of structural integrity
+ * - Participate in persistence, transport, and transformation pipelines
+ *
+ * It forms the foundation of FireHub's DS lifecycle model.
+ * @since 1.0.0
+ *
+ * @template TStructure of \FireHub\Core\Support\Contracts\DataStructure
+ * @template TStorage of \FireHub\Core\Support\DataStructure\Storage
+ * @template TArray of array
+ */
+interface Rehydratable {
+
+ /**
+ * ### Extract the canonical structural state representation
+ *
+ * Exports the logical contents and structural metadata of the data structure into a deterministic, lossless, and
+ * implementation-independent format.
+ *
+ * The resulting state must contain enough information to fully reconstruct the structure through the
+ * corresponding hydration process.
+ * @since 1.0.0
+ *
+ * @return \FireHub\Core\Support\DataStructure\DTO\DehydratedState Canonical dehydrated
+ * structure state.
+ */
+ public function dehydrate ():DehydratedState;
+
+ /**
+ * ### Reconstruct structure from a canonical state
+ *
+ * Reconstructs a fully functional data structure instance from a canonical DehydratedState snapshot.
+ * Hydration is a deterministic reverse lifecycle operation that restores the original structural identity of a
+ * data structure without altering its semantic meaning or introducing runtime-specific side effects.
+ * @since 1.0.0
+ *
+ * @template TNewStructure of TStructure
+ * @template TNewStorage of TStorage
+ * @template TNewArray of TArray
+ *
+ * @param \FireHub\Core\Support\DataStructure\DTO\DehydratedState $state
+ * Canonical state snapshot.
+ *
+ *
+ * @return static Fully reconstructed data structure.
+ */
+ public static function hydrate (DehydratedState $state):static;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/capability/firehub.Snapshotable.php b/src/support/datastructure/capability/firehub.Snapshotable.php
new file mode 100644
index 00000000..69d5bfaf
--- /dev/null
+++ b/src/support/datastructure/capability/firehub.Snapshotable.php
@@ -0,0 +1,43 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Capability;
+
+use FireHub\Core\Support\DataStructure\Structure\Snapshot\Snapshot;
+
+/**
+ * ### Snapshotable Data Structure
+ *
+ * Provides a read-only view of the current state of a data structure.
+ * Snapshot is typically optimized for zero-copy or shared-storage access.
+ * @since 1.0.0
+ *
+ * @template TKey
+ * @template TValue
+ */
+interface Snapshotable {
+
+ /**
+ * ### Create an immutable snapshot of the current state
+ *
+ * Returns a read-only representation of the structure at a point in time.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Structure\Snapshot\Snapshot As return.
+ *
+ * @return \FireHub\Core\Support\DataStructure\Structure\Snapshot\Snapshot Immutable snapshot of
+ * current state.
+ */
+ public function snapshot ():Snapshot;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/dto/firehub.DehydratedState.php b/src/support/datastructure/dto/firehub.DehydratedState.php
new file mode 100644
index 00000000..cdf2df96
--- /dev/null
+++ b/src/support/datastructure/dto/firehub.DehydratedState.php
@@ -0,0 +1,57 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.2
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\DTO;
+
+use FireHub\Core\Shared\Contracts\DataTransferObject;
+
+/**
+ * ### Dehydrated State
+ *
+ * Immutable canonical snapshot of a DataStructure at a specific point in time.
+ *
+ * It represents a transportable, storage-independent representation of a data
+ * structure, used for:
+ * - Hydration (reconstruction of the same structure)
+ * - Persistence (storage encoding)
+ * - Transformation (forge pipelines)
+ *
+ * The state is NOT tied to memory layout, runtime behavior, or storage engine.
+ * It is a pure structural representation of data and relationships.
+ * @since 1.0.0
+ *
+ * @template TStructure of \FireHub\Core\Support\Contracts\DataStructure
+ * @template TStorage of \FireHub\Core\Support\DataStructure\Storage
+ * @template TArray of array
+ */
+final readonly class DehydratedState implements DataTransferObject {
+
+ /**
+ * ### Constructor
+ * @since 1.0.0
+ *
+ * @param \FireHub\Core\Support\DataStructure\DTO\StateHeader $header
+ * Header of the state.
+ *
+ * @param TArray $payload
+ * Payload of the state.
+ *
+ *
+ * @return void
+ */
+ public function __construct (
+ public StateHeader $header,
+ public array $payload
+ ) {}
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/dto/firehub.StateHeader.php b/src/support/datastructure/dto/firehub.StateHeader.php
new file mode 100644
index 00000000..8c7bbd0d
--- /dev/null
+++ b/src/support/datastructure/dto/firehub.StateHeader.php
@@ -0,0 +1,53 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.2
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\DTO;
+
+use FireHub\Core\Shared\Contracts\DataTransferObject;
+
+/**
+ * ### State Header
+ *
+ * Immutable metadata describing a dehydrated data structure state.
+ *
+ * Contains only structural identity and compatibility information, not runtime or business logic.
+ * @since 1.0.0
+ *
+ * @template TStructure of \FireHub\Core\Support\Contracts\DataStructure
+ * @template TStorage of \FireHub\Core\Support\DataStructure\Storage
+ */
+final readonly class StateHeader implements DataTransferObject {
+
+ /**
+ * ### Constructor
+ * @since 1.0.0
+ *
+ * @param positive-int $version
+ * Version of the data structure hydration.
+ *
+ * @param class-string $structure
+ * Name of the data structure.
+ *
+ * @param class-string $storage
+ * Name of the storage.
+ *
+ *
+ * @return void
+ */
+ public function __construct (
+ public int $version,
+ public string $structure,
+ public string $storage
+ ) {}
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/interface.Storage.php b/src/support/datastructure/interface.Storage.php
new file mode 100644
index 00000000..048a3871
--- /dev/null
+++ b/src/support/datastructure/interface.Storage.php
@@ -0,0 +1,44 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure;
+
+/**
+ * ### Storage Abstraction Layer
+ *
+ * Root contract for all storage implementations in the system.
+ * A Storage represents a persistence boundary responsible for holding, exposing, and iterating over data entries
+ * through a unified access model. It abstracts away the underlying memory or structural representation, ensuring that
+ * all implementations provide a consistent entry-based interface for consumption by Data Structures.
+ * @since 1.0.0
+ *
+ * @template TKey
+ * @template TValue
+ */
+interface Storage {
+
+ /**
+ * ### Traverses Storage Elements
+ *
+ * Provides a unified, read-only traversal contract for accessing all elements within a storage implementation.
+ * The method exposes elements in their natural iteration order without leaking internal structure details or
+ * coupling the consumer to a specific storage strategy.
+ * Each storage implementation defines its own traversal mechanism, but all must guarantee compliance with
+ * the iterable contract and ensure safe, side-effect-free iteration over the current state.
+ * @since 1.0.0
+ *
+ * @return iterable
+ */
+ public function iterate ():iterable;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/runtime/firehub.HasCopyOnWriteState.php b/src/support/datastructure/runtime/firehub.HasCopyOnWriteState.php
new file mode 100644
index 00000000..2eee5033
--- /dev/null
+++ b/src/support/datastructure/runtime/firehub.HasCopyOnWriteState.php
@@ -0,0 +1,84 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.4
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Runtime;
+
+/**
+ * ### Copy-On-Write State Management
+ *
+ * Provides structural sharing and lazy cloning behavior for data structures. This trait enables multiple instances
+ * to share the same underlying storage until a mutation forces a safe deep copy (detach).
+ *
+ * It is responsible only for ownership tracking and memory sharing logic, not for mutation rules or immutability
+ * enforcement.
+ * @since 1.0.0
+ */
+trait HasCopyOnWriteState {
+
+ /**
+ * ### Data Structure Structural State
+ * @since 1.0.0
+ *
+ * @var \FireHub\Core\Support\DataStructure\Runtime\StructureState
+ */
+ private StructureState $state;
+
+ /**
+ * ### Conditional Storage Detachment
+ *
+ * Performs a copy-on-write operation if the current storage is shared between multiple data structure instances.
+ *
+ * This ensures mutation safety by creating an isolated storage copy before any write operation is performed.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Runtime\StructureState::isExclusive() To check if the storage is
+ * exclusive (not shared).
+ * @uses \FireHub\Core\Support\DataStructure\Runtime\StructureState::decreaseRefs() To decrease Reference Counter.
+ * @uses \FireHub\Core\Support\DataStructure\Capability\Copyable::copy() To create a full independent deep copy
+ * of the storage if needed.
+ *
+ * @throws \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidCowStateException If the reference counter
+ * drops bellow 1.
+ *
+ * @return void
+ */
+ private function detachIfNeeded ():void {
+
+ if ($this->state->isExclusive()) return;
+
+ $this->storage = $this->storage->copy();
+
+ $this->state->decreaseRefs();
+
+ $this->state = new StructureState();
+
+ }
+
+ /**
+ * ### Increase Shared Ownership Reference
+ *
+ * Increments the internal reference counter when a new data structure instance begins sharing the same storage
+ * (e.g., fork operation).
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Runtime\StructureState::increaseRefs() To increase Reference Counter.
+ *
+ * @return void
+ */
+ private function increaseRef ():void {
+
+ $this->state->increaseRefs();
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/runtime/firehub.HasFreezeState.php b/src/support/datastructure/runtime/firehub.HasFreezeState.php
new file mode 100644
index 00000000..1d789d73
--- /dev/null
+++ b/src/support/datastructure/runtime/firehub.HasFreezeState.php
@@ -0,0 +1,71 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.4
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Runtime;
+
+use FireHub\Core\Throwable\Exception\Support\DataStructure\FrozenDataStructureException;
+
+/**
+ * ### Mutation Freeze Control
+ *
+ * Provides the ability to lock a data structure into an immutable state. Once frozen, all mutation operations must
+ * be rejected.
+ *
+ * This trait is responsible only for mutation safety enforcement and does not manage memory sharing or storage
+ * duplication.
+ * @since 1.0.0
+ */
+trait HasFreezeState {
+
+ /**
+ * ### Frozen State Flag
+ *
+ * Indicates whether the data structure is immutable. When true, all mutation attempts must throw an exception.
+ * @since 1.0.0
+ *
+ * @var bool True if structure is frozen, false otherwise.
+ */
+ private bool $frozen = false;
+
+ /**
+ * ### Check Frozen State
+ *
+ * Returns whether the data structure is currently immutable.
+ * @since 1.0.0
+ *
+ * @return bool True if frozen, false otherwise.
+ */
+ public function isFrozen ():bool {
+
+ return $this->frozen;
+
+ }
+
+ /**
+ * ### Mutation Guard: Freeze Check
+ *
+ * Ensures that the data structure is not in a frozen state before allowing any mutation operation to proceed.
+ * @since 1.0.0
+ *
+ * @throws \FireHub\Core\Throwable\Exception\Support\DataStructure\FrozenDataStructureException If the structure
+ * is frozen.
+ *
+ * @return void
+ */
+ private function assertNotFrozen ():void {
+
+ if ($this->frozen) throw new FrozenDataStructureException;
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/runtime/firehub.StructureState.php b/src/support/datastructure/runtime/firehub.StructureState.php
new file mode 100644
index 00000000..5d83ec7f
--- /dev/null
+++ b/src/support/datastructure/runtime/firehub.StructureState.php
@@ -0,0 +1,104 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.4
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Runtime;
+
+use FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidCowStateException;
+
+/**
+ * ### Data Structure Structural State
+ *
+ * Represents shared runtime state between multiple instances of a data structure.
+ * This includes ownership tracking (COW), versioning metadata, and shared lifecycle control.
+ * @since 1.0.0
+ */
+final class StructureState {
+
+ /**
+ * ### Shared Ownership Counter
+ *
+ * Tracks how many data structure instances share the same underlying storage.
+ * Used to determine when a safe detaching (copy-on-write) is required.
+ * @since 1.0.0
+ *
+ * @var positive-int Number of active references to shared storage.
+ */
+ private int $refs = 1;
+
+ /**
+ * ### Retrieve Reference Counter value
+ * @since 1.0.0
+ *
+ * @return positive-int Reference counter value.
+ */
+ public function getRefs ():int {
+
+ return $this->refs;
+
+ }
+
+ /**
+ * ### Increase Reference Counter
+ * @since 1.0.0
+ *
+ * @return void
+ */
+ public function increaseRefs ():void {
+
+ $this->refs++;
+
+ }
+
+ /**
+ * ### Decrease Reference Counter
+ * @since 1.0.0
+ *
+ * @throws \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidCowStateException If the reference counter
+ * drops bellow 1.
+ *
+ * @return void
+ */
+ public function decreaseRefs ():void {
+
+ if ($this->refs <= 1)
+ throw new InvalidCowStateException('Invalid COW state: cannot drop below 1.');
+
+ $this->refs--;
+
+ }
+
+ /**
+ * ### Check if Reference Counter is shared
+ * @since 1.0.0
+ *
+ * @return bool True if Reference Counter is shared, false otherwise.
+ */
+ public function isShared(): bool {
+
+ return $this->refs > 1;
+
+ }
+
+ /**
+ * ### Check if Reference Counter is exclusive
+ * @since 1.0.0
+ *
+ * @return bool True if Reference Counter is exclusive, false otherwise.
+ */
+ public function isExclusive(): bool {
+
+ return $this->refs === 1;
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.BackInsertion.php b/src/support/datastructure/storage/capability/firehub.BackInsertion.php
new file mode 100644
index 00000000..d76a04a9
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.BackInsertion.php
@@ -0,0 +1,39 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+/**
+ * ### Back Insertion
+ *
+ * Provides the ability to insert one or more elements at the logical end of the structure in constant time, assuming
+ * tail access is available.
+ * @since 1.0.0
+ *
+ * @template TValue
+ */
+interface BackInsertion {
+
+ /**
+ * ### Append values to the back
+ * @since 1.0.0
+ *
+ * @param TValue ...$values
+ * List of values to add to the back of the storage.
+ *
+ *
+ * @return static The modified storage structure.
+ */
+ public function addLast (mixed ...$values):static;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.BackMutation.php b/src/support/datastructure/storage/capability/firehub.BackMutation.php
new file mode 100644
index 00000000..0d5f9267
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.BackMutation.php
@@ -0,0 +1,26 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+/**
+ * ### Back Mutation Capability
+ *
+ * Combines back insertion and back removal, enabling full mutation of the logical end of the structure.
+ * @since 1.0.0
+ *
+ * @template TValue
+ *
+ * @extends \FireHub\Core\Support\DataStructure\Storage\Capability\BackInsertion
+ */
+interface BackMutation extends BackInsertion, BackRemoval {}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.BackRemoval.php b/src/support/datastructure/storage/capability/firehub.BackRemoval.php
new file mode 100644
index 00000000..8b1c48e2
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.BackRemoval.php
@@ -0,0 +1,36 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+/**
+ * ### Back Removal
+ *
+ * Provides the ability to remove one or more elements from the logical end of the structure in constant time.
+ * @since 1.0.0
+ */
+interface BackRemoval {
+
+ /**
+ * ### Removes values from the back
+ * @since 1.0.0
+ *
+ * @param int $items [optional]
+ * Number of values to remove from the back of the storage.
+ *
+ *
+ * @return static The modified storage structure.
+ */
+ public function removeLast (int $items = 1):static;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.Cloneable.php b/src/support/datastructure/storage/capability/firehub.Cloneable.php
new file mode 100644
index 00000000..78ffc55d
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.Cloneable.php
@@ -0,0 +1,40 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+/**
+ * ### Provide explicit deep copy of a storage
+ *
+ * Defines a contract for creating a full, independent copy of a storage by duplicating all underlying data. The
+ * resulting instance has no shared state with the original, ensuring complete isolation at the cost of O(n) time and
+ * memory complexity. Suitable for scenarios where data integrity and independence are required over performance
+ * optimizations.
+ * @since 1.0.0
+ */
+interface Cloneable {
+
+ /**
+ * ### Create a full independent deep copy of the storage
+ *
+ * Creates a completely independent clone of the storage by duplicating all internal data. The resulting instance
+ * shares no state with the original, ensuring full isolation between both objects. This operation has O(n) time
+ * and memory complexity and is suitable when data integrity and strict independence are required over performance
+ * optimization.
+ * @since 1.0.0
+ *
+ * @return static A deep copy of the storage.
+ */
+ public function copy ():static;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.Convertible.php b/src/support/datastructure/storage/capability/firehub.Convertible.php
new file mode 100644
index 00000000..75f540b8
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.Convertible.php
@@ -0,0 +1,47 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+use FireHub\Core\Support\DataStructure\Storage;
+
+/**
+ * ### Storage Convertible Capability
+ *
+ * Defines a contract for storage implementations that can be constructed from another storage instance.
+ * @since 1.0.0
+ *
+ * @template TKey
+ * @template TValue
+ */
+interface Convertible {
+
+ /**
+ * ### Create from another storage
+ *
+ * Creates a new storage instance from an existing storage.
+ * @since 1.0.0
+ *
+ * @template TStorageKey of TKey
+ * @template TStorageValue of TValue
+ * @template TStorage of \FireHub\Core\Support\DataStructure\Storage
+ *
+ * @param TStorage $storage
+ * Provided storage.
+ *
+ *
+ * @return static New storage from provided storage.
+ */
+ public static function fromStorage (Storage $storage):static;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.CyclicTraversal.php b/src/support/datastructure/storage/capability/firehub.CyclicTraversal.php
new file mode 100644
index 00000000..dbaa981b
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.CyclicTraversal.php
@@ -0,0 +1,47 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+/**
+ * ### Cyclic Traversal Capability
+ *
+ * Provides the ability to traverse a data structure in a continuous infinite loop. This capability is intended for
+ * cyclic or circular data structures where iteration does not terminate naturally and instead restarts from the
+ * beginning upon reaching the end.
+ * @since 1.0.0
+ *
+ * @template TKey
+ * @template TValue
+ */
+interface CyclicTraversal {
+
+ /**
+ * ### Cycle through elements infinitely
+ *
+ * Returns an infinite iterable sequence that continuously traverses the structure in a loop, restarting from the
+ * beginning once the end is reached.
+ * @since 1.0.0
+ *
+ * @param null|int $limit
+ * Maximum number of elements to yield. If null, traversal is infinite.
+ *
+ *
+ * @return iterable Infinite cyclic traversal of elements.
+ *
+ * @warning This method does not terminate naturally and must be consumed with care
+ * (e.g. with limits or external stopping conditions).
+ */
+ public function cycle (?int $limit = null):iterable;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.DequeMutation.php b/src/support/datastructure/storage/capability/firehub.DequeMutation.php
new file mode 100644
index 00000000..2a0ff754
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.DequeMutation.php
@@ -0,0 +1,30 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+/**
+ * ### Deque End Mutation Capability
+ *
+ * Defines the ability of a storage structure to perform double-ended mutations on a linear sequence. This includes
+ * adding elements to both ends (append and prepend) as well as removing elements from both ends (pop and shift).
+ * It is intended for data structures that maintain ordered elements with efficient front and back operations, such as
+ * deque, linked lists, and sequence-based storages.
+ * @since 1.0.0
+ *
+ * @template TValue
+ *
+ * @extends \FireHub\Core\Support\DataStructure\Storage\Capability\FrontMutation
+ * @extends \FireHub\Core\Support\DataStructure\Storage\Capability\BackMutation
+ */
+interface DequeMutation extends FrontMutation, BackMutation {}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.FrontInsertion.php b/src/support/datastructure/storage/capability/firehub.FrontInsertion.php
new file mode 100644
index 00000000..692b62b5
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.FrontInsertion.php
@@ -0,0 +1,38 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+/**
+ * ### Front Insertion
+ *
+ * Provides the ability to insert one or more elements at the logical start the structure in constant time.
+ * @since 1.0.0
+ *
+ * @template TValue
+ */
+interface FrontInsertion {
+
+ /**
+ * ### Prepend values to the front
+ * @since 1.0.0
+ *
+ * @param TValue ...$values
+ * List of values to add to the front of the storage.
+ *
+ *
+ * @return static The modified storage structure.
+ */
+ public function addFirst (mixed ...$values):static;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.FrontMutation.php b/src/support/datastructure/storage/capability/firehub.FrontMutation.php
new file mode 100644
index 00000000..9258e9e4
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.FrontMutation.php
@@ -0,0 +1,26 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+/**
+ * ### Front Mutation Capability
+ *
+ * Combines front insertion and front removal, enabling full mutation of the logical start of the structure.
+ * @since 1.0.0
+ *
+ * @template TValue
+ *
+ * @extends \FireHub\Core\Support\DataStructure\Storage\Capability\FrontInsertion
+ */
+interface FrontMutation extends FrontInsertion, FrontRemoval {}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.FrontRemoval.php b/src/support/datastructure/storage/capability/firehub.FrontRemoval.php
new file mode 100644
index 00000000..99c33d2f
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.FrontRemoval.php
@@ -0,0 +1,36 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+/**
+ * ### Front Removal
+ *
+ * Provides the ability to remove one or more elements from the logical start of the structure in constant time.
+ * @since 1.0.0
+ */
+interface FrontRemoval {
+
+ /**
+ * ### Removes values from the front
+ * @since 1.0.0
+ *
+ * @param int $items [optional]
+ * Number of values to remove from the front of the storage.
+ *
+ *
+ * @return static The modified storage structure.
+ */
+ public function removeFirst (int $items = 1):static;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.IndexAccess.php b/src/support/datastructure/storage/capability/firehub.IndexAccess.php
new file mode 100644
index 00000000..8d4ffbe7
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.IndexAccess.php
@@ -0,0 +1,65 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+use FireHub\Core\Shared\Type\Maybe;
+
+/**
+ * ### Positional Index Access Capability
+ *
+ * A storage capability that provides read-only access to elements based on their positional index within a linear
+ * structure. It enables safe retrieval and existence checks over ordered collections such as arrays, lists, fixed-size
+ * buffers, and ring buffers. The abstraction assumes a dense or logically mapped index space where each integer index
+ * represents a position rather than an identity or key.
+ * @since 1.0.0
+ *
+ * @template TValue
+ */
+interface IndexAccess {
+
+ /**
+ * ### Check Index Existence
+ *
+ * Determines whether a valid element exists at the given positional index. This operation does not retrieve the
+ * value and is optimized for fast boundary or presence checks within indexed storage structures.
+ * @since 1.0.0
+ *
+ * @param int $index
+ * The key to check for existence.
+ *
+ *
+ * @return bool True if the key exists, false otherwise.
+ */
+ public function has (int $index):bool;
+
+ /**
+ * ### Retrieve Value by Index
+ *
+ * Returns the value located at the specified positional index within the storage. If the index does not exist or
+ * is out of bounds, an empty Maybe is returned. This operation provides safe, read-only access to ordered storage
+ * without exposing internal structure or requiring direct array access.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Shared\Type\Maybe As return.
+ *
+ * @param int $index
+ * The key to retrieve value by index.
+ *
+ *
+ * @return \FireHub\Core\Shared\Type\Maybe|\FireHub\Core\Shared\Type\Maybe Maybe with element at index
+ * position of the storage, or Maybe with null if element at index position of the storage doesn't exist.
+ */
+ public function get (int $index):Maybe;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.IndexMutation.php b/src/support/datastructure/storage/capability/firehub.IndexMutation.php
new file mode 100644
index 00000000..862fcaa0
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.IndexMutation.php
@@ -0,0 +1,72 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+use FireHub\Core\Shared\Enums\MutationOutcome;
+
+/**
+ * ### Positional Index Mutation Capability
+ *
+ * A storage capability that enables modification of elements based on their positional index within a linear
+ * structure. It defines write and removal operations over indexed storage models such as arrays, lists, fixed
+ * buffers, and ring buffers. The abstraction assumes a positional addressing scheme where integer indexes represent
+ * logical positions rather than identity or key-based mappings.
+ * @since 1.0.0
+ *
+ * @template TValue
+ */
+interface IndexMutation {
+
+ /**
+ * ### Set Value at Index
+ *
+ * Assigns a value to the specified positional index in the storage. If the index already contains a value, it is
+ * overwritten according to the storage’s mutation semantics. This operation assumes a valid index-based
+ * addressing model and does not perform key resolution or structural lookup.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Shared\Enums\MutationOutcome As return.
+ *
+ * @param int $index
+ * The key where the value will be added.
+ *
+ * @param TValue $value
+ * Value to add to the index.
+ *
+ *
+ * @return \FireHub\Core\Shared\Enums\MutationOutcome::CREATED|\FireHub\Core\Shared\Enums\MutationOutcome::UPDATED
+ * An enum indicating the result of the mutation operation.
+ */
+ public function set (int $index, mixed $value):MutationOutcome;
+
+ /**
+ * ### Remove Value by Index
+ *
+ * Removes the element located at the specified index. The behavior after removal depends on the storage
+ * implementation (e.g., shifting in lists, pulling in fixed storage, or logical repositioning in ring buffers).
+ * This operation affects structural layout but not value semantics directly.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Shared\Enums\MutationOutcome As return.
+ *
+ * @param int $index
+ * The key of the value to remove.
+ *
+ *
+ * @return \FireHub\Core\Shared\Enums\MutationOutcome::REMOVED|\FireHub\Core\Shared\Enums\MutationOutcome::NOT_FOUND
+ * An enum indicating the result of the mutation operation.
+ */
+ public function remove (int $index):MutationOutcome;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.KeyAccess.php b/src/support/datastructure/storage/capability/firehub.KeyAccess.php
new file mode 100644
index 00000000..470805dd
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.KeyAccess.php
@@ -0,0 +1,67 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+use FireHub\Core\Shared\Type\Maybe;
+
+/**
+ * ### Key-Based Read Access Capability
+ *
+ * A storage capability that provides read-only access to elements identified by a key (string or integer). It
+ * enables safe retrieval and existence checks without exposing mutation operations or internal storage structure.
+ * Designed for associative data structures such as maps, registries, and indexed key-value stores where lookup
+ * semantics are primary and structural details remain encapsulated.
+ * @since 1.0.0
+ *
+ * @template TKey of array-key
+ * @template TValue
+ */
+interface KeyAccess {
+
+ /**
+ * ### Check Key Existence
+ *
+ * Determines whether a value exists for the specified key in the storage. Provides a fast existence check
+ * without retrieving the underlying value, enabling safe conditional access patterns.
+ * @since 1.0.0
+ *
+ * @param TKey $key
+ * The key to check for existence.
+ *
+ *
+ * @return bool True if the key exists, false otherwise.
+ */
+ public function has (int|string $key):bool;
+
+ /**
+ * ### Retrieve Value by Key
+ *
+ * Retrieves the value associated with the given key from an associative storage structure. If the key does not
+ * exist, an empty Maybe is returned instead of null, ensuring explicit handling of missing entries. This operation
+ * does not modify the storage and is designed for safe, read-only access to key-based data mappings such as
+ * dictionaries, maps, and registries.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Shared\Type\Maybe As return.
+ *
+ * @param TKey $key
+ * The key to retrieve value by key.
+ *
+ *
+ * @return \FireHub\Core\Shared\Type\Maybe|\FireHub\Core\Shared\Type\Maybe Maybe with element at key
+ * position of the storage, or Maybe with null if element at key position of the storage doesn't exist.
+ */
+ public function get (int|string $key):Maybe;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.KeyMutation.php b/src/support/datastructure/storage/capability/firehub.KeyMutation.php
new file mode 100644
index 00000000..5274739b
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.KeyMutation.php
@@ -0,0 +1,73 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+use FireHub\Core\Shared\Enums\MutationOutcome;
+
+/**
+ * ### Associative Key Mutation Capability
+ *
+ * A storage capability that enables modification of elements based on associative keys (string or integer
+ * identifiers). It defines write and removal operations over key-value storage models such as maps, dictionaries,
+ * and registries. The abstraction assumes a key-based addressing scheme where keys represent stable identifiers
+ * rather than positional indexes.
+ * @since 1.0.0
+ *
+ * @template TKey of array-key
+ * @template TValue
+ */
+interface KeyMutation {
+
+ /**
+ * ### Set Value by Key
+ *
+ * Assigns a value to the specified key in the associative storage. If the key already exists, the existing
+ * value is overwritten. If it does not exist, a new entry is created. This operation is fundamental for
+ * key-value-based structures and does not involve positional logic or traversal.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Shared\Enums\MutationOutcome As return.
+ *
+ * @param TKey $key
+ * The key where the value will be added.
+ *
+ * @param TValue $value
+ * Value to add to the key.
+ *
+ *
+ * @return \FireHub\Core\Shared\Enums\MutationOutcome::CREATED|\FireHub\Core\Shared\Enums\MutationOutcome::UPDATED
+ * An enum indicating the result of the mutation operation.
+ */
+ public function set (int|string $key, mixed $value):MutationOutcome;
+
+ /**
+ * ### Remove Value by Key
+ *
+ * Removes the entry associated with the specified key from the storage. If the key does not exist, the operation
+ * has no effect. This mutation affects only the associative mapping layer and does not depend on element ordering
+ * or structural position.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Shared\Enums\MutationOutcome As return.
+ *
+ * @param TKey $key
+ * The key of the value to remove.
+ *
+ *
+ * @return \FireHub\Core\Shared\Enums\MutationOutcome::REMOVED|\FireHub\Core\Shared\Enums\MutationOutcome::NOT_FOUND
+ * An enum indicating the result of the mutation operation.
+ */
+ public function remove (int|string $key):MutationOutcome;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.LinearBoundaryAccess.php b/src/support/datastructure/storage/capability/firehub.LinearBoundaryAccess.php
new file mode 100644
index 00000000..e5e24b0c
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.LinearBoundaryAccess.php
@@ -0,0 +1,54 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+use FireHub\Core\Shared\Type\Maybe;
+
+/**
+ * ### Linear Boundary Access Capability
+ *
+ * Defines the ability for a storage implementation to provide direct access to the boundaries
+ * of a linear sequence. This includes retrieving the first element and the last element without requiring full
+ * traversal of the underlying data. Intended as an optional optimization layer for linear structures where boundary
+ * access can be performed in constant time, while maintaining separation between storage concerns and data structure
+ * semantics.
+ * @since 1.0.0
+ *
+ * @template TValue
+ */
+interface LinearBoundaryAccess {
+
+ /**
+ * ### Retrieve the first element
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Shared\Type\Maybe As return.
+ *
+ * @return \FireHub\Core\Shared\Type\Maybe|\FireHub\Core\Shared\Type\Maybe Maybe with first element
+ * of the storage, or Maybe with null if storage is empty.
+ */
+ public function first ():Maybe;
+
+ /**
+ * ### Retrieve the last element
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Shared\Type\Maybe As return.
+ *
+ * @return \FireHub\Core\Shared\Type\Maybe|\FireHub\Core\Shared\Type\Maybe Maybe with last element
+ * of the storage, or Maybe with null if storage is empty.
+ */
+ public function last ():Maybe;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.NodeAccess.php b/src/support/datastructure/storage/capability/firehub.NodeAccess.php
new file mode 100644
index 00000000..c18187a8
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.NodeAccess.php
@@ -0,0 +1,62 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+use FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle;
+
+/**
+ * ### Node Handle Access Capability
+ *
+ * Defines a read-only capability for accessing structural positions within a node-based storage system through
+ * NodeHandle references. It provides safe entry points into the internal topology without exposing raw nodes or
+ * traversal logic. This interface is intended exclusively for storage implementations that are based on explicit node
+ * structures such as linked lists, trees, or graph-like systems.
+ * @since 1.0.0
+ *
+ * @template TValue
+ */
+interface NodeAccess {
+
+ /**
+ * ### Retrieve First Node Handle
+ *
+ * Returns a NodeHandle representing the first logical element in the storage structure. The definition of
+ * “first” depends on the underlying topology (e.g. head in linked lists or root-like entry in hierarchical
+ * structures). Returns null if the structure is empty.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle As return.
+ *
+ * @return null|\FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle NodeHandle with value at the
+ * first position in the storage, or null if the structure is empty.
+ */
+ public function firstNode ():?NodeHandle;
+
+ /**
+ * ### Retrieve Last Node Handle
+ *
+ * Returns a NodeHandle representing the last logical element in the storage structure. Applicable primarily to
+ * ordered or linear node-based structures such as linked lists or deque-based implementations. Returns null if the
+ * structure is empty.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle As return.
+ *
+ * @return null|\FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle NodeHandle with value at the
+ * last position in the storage, or null if the structure is empty.
+ */
+ public function lastNode ():?NodeHandle;
+
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.NodeBidirectionalInsert.php b/src/support/datastructure/storage/capability/firehub.NodeBidirectionalInsert.php
new file mode 100644
index 00000000..546d4ae3
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.NodeBidirectionalInsert.php
@@ -0,0 +1,29 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+/**
+ * ### Bidirectional Node Insertion Capability
+ *
+ * A composite capability that combines both forward (after) and backward (before) node insertion operations. It
+ * represents full positional insertion control within a node-based storage topology and is typically supported by
+ * doubly linked structures.
+ * @since 1.0.0
+ *
+ * @template TValue
+ *
+ * @extends \FireHub\Core\Support\DataStructure\Storage\Capability\NodeInsertBefore
+ * @extends \FireHub\Core\Support\DataStructure\Storage\Capability\NodeInsertAfter
+ */
+interface NodeBidirectionalInsert extends NodeInsertBefore, NodeInsertAfter {}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.NodeInsertAfter.php b/src/support/datastructure/storage/capability/firehub.NodeInsertAfter.php
new file mode 100644
index 00000000..d921661e
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.NodeInsertAfter.php
@@ -0,0 +1,50 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+use FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle;
+
+/**
+ * ### Post-Node Insertion Capability
+ *
+ * Defines the ability to insert a node directly after a given target node within a pointer-based storage structure.
+ * This operation assumes the existence of forward-linking topology and is typically O(1) in singly, doubly, and
+ * circular linked structures.
+ * @since 1.0.0
+ *
+ * @template TValue
+ */
+interface NodeInsertAfter {
+
+ /**
+ * ### Insert a node after a target node
+ *
+ * Inserts a new node immediately after the specified target node, updating internal links to maintain structural
+ * consistency. Operates in O(1) for linked implementations where node references are directly accessible.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle As parameter and return.
+ *
+ * @param \FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle $target
+ * The node after which the new node will be inserted.
+ *
+ * @param TValue $value
+ * The value to be inserted.
+ *
+ *
+ * @return \FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle New node handle.
+ */
+ public function insertAfter (NodeHandle $target, mixed $value):NodeHandle;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.NodeInsertBefore.php b/src/support/datastructure/storage/capability/firehub.NodeInsertBefore.php
new file mode 100644
index 00000000..b069a057
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.NodeInsertBefore.php
@@ -0,0 +1,50 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+use FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle;
+
+/**
+ * ### Pre-Node Insertion Capability
+ *
+ * Defines the ability to insert a node directly before a given target node. This operation requires backward
+ * navigation or traversal support and is naturally supported in doubly linked structures, while potentially O(n) in
+ * singly linked implementations.
+ * @since 1.0.0
+ *
+ * @template TValue
+ */
+interface NodeInsertBefore {
+
+ /**
+ * ### Insert a node before a target node
+ *
+ * Inserts a new node immediately before the specified target node. Requires traversal in singly linked
+ * structures but operates in O(1) for doubly linked implementations where backward references are available.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle As parameter and return.
+ *
+ * @param \FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle $target
+ * The node before which the new node will be inserted.
+ *
+ * @param TValue $value
+ * The value to be inserted.
+ *
+ *
+ * @return \FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle New node handle.
+ */
+ public function insertBefore (NodeHandle $target, mixed $value):NodeHandle;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.NodeMutation.php b/src/support/datastructure/storage/capability/firehub.NodeMutation.php
new file mode 100644
index 00000000..da2f800e
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.NodeMutation.php
@@ -0,0 +1,29 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+/**
+ * ### Full Node Mutation Capability
+ *
+ * A composite capability that represents full structural mutation support for node-based storage systems. It
+ * combines bidirectional insertion and node removal capabilities, enabling complete topological control over a linked
+ * structure. Typically implemented by doubly linked or a circular linked storages.
+ * @since 1.0.0
+ *
+ * @template TValue
+ *
+ * @extends \FireHub\Core\Support\DataStructure\Storage\Capability\NodeBidirectionalInsert
+ * @extends \FireHub\Core\Support\DataStructure\Storage\Capability\NodeRemoval
+ */
+interface NodeMutation extends NodeBidirectionalInsert, NodeRemoval {}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.NodeRemoval.php b/src/support/datastructure/storage/capability/firehub.NodeRemoval.php
new file mode 100644
index 00000000..10b09d54
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.NodeRemoval.php
@@ -0,0 +1,48 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+use FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle;
+
+/**
+ * ### Node Removal Capability
+ *
+ * Defines the ability to remove a specific node from a storage structure by directly manipulating its surrounding
+ * links. This operation is pointer-based and allows O(1) removal in structures that maintain direct references to
+ * adjacent nodes.
+ * @since 1.0.0
+ *
+ * @template TValue
+ */
+interface NodeRemoval {
+
+ /**
+ * ### Remove Node from storage
+ *
+ * Removes the specified node from the storage structure and reconnects surrounding nodes to preserve continuity.
+ * Complexity depends on a structure type (O(1) for doubly-linked with direct reference, O(n) for singly-linked
+ * traversal-based removal).
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle As parameter.
+ *
+ * @param \FireHub\Core\Support\DataStructure\Storage\Handle\NodeHandle $handle
+ * The node to remove.
+ *
+ *
+ * @return static The modified storage structure.
+ */
+ public function removeNode (NodeHandle $handle):static;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/capability/firehub.StorageMetricsAware.php b/src/support/datastructure/storage/capability/firehub.StorageMetricsAware.php
new file mode 100644
index 00000000..92ca4f08
--- /dev/null
+++ b/src/support/datastructure/storage/capability/firehub.StorageMetricsAware.php
@@ -0,0 +1,58 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Capability;
+
+/**
+ * ### Storage Metrics Awareness Contract
+ *
+ * A unified interface that defines standardized introspection capabilities for storage structures.
+ * It provides a consistent way to access structural metrics such as the number of active elements and the maximum
+ * storage capacity across all FireHub data structure implementations.
+ *This contract ensures uniform observability for both bounded and unbounded storage types, enabling generic
+ * algorithms, diagnostics, and performance-aware operations to interact with different storage implementations
+ * without knowledge of their internal representation.
+ * It serves as a core abstraction layer for monitoring storage state, supporting operations such as utilization
+ * analysis, capacity planning, and runtime optimization decisions.
+ * @since 1.0.0
+ */
+interface StorageMetricsAware {
+
+ /**
+ * ### Retrieve the maximum number of elements that can be stored in the storage
+ * @since 1.0.0
+ *
+ * @return null|non-negative-int The maximum number of elements that can be stored in the storage, or null for
+ * unbounded storage.
+ */
+ public function capacity ():?int;
+
+ /**
+ * ### Retrieve the remaining capacity that can be used in the storage
+ *
+ * @since 1.0.0
+ *
+ * @return null|non-negative-int The remaining capacity that can be used in the storage, or null for unbounded
+ * storage.
+ */
+ public function availableCapacity ():?int;
+
+ /**
+ * ### Retrieve the number of elements stored in the storage
+ * @since 1.0.0
+ *
+ * @return non-negative-int The number of elements stored in the storage.
+ */
+ public function size ():int;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/engine/firehub.ArrHashEngine.php b/src/support/datastructure/storage/engine/firehub.ArrHashEngine.php
new file mode 100644
index 00000000..3d6ceb46
--- /dev/null
+++ b/src/support/datastructure/storage/engine/firehub.ArrHashEngine.php
@@ -0,0 +1,133 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.1
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Engine;
+
+use FireHub\Core\Support\DataStructure\Storage\HashEngine;
+use FireHub\Core\Shared\Type\Maybe;
+use FireHub\Core\Shared\Enums\MutationOutcome;
+use FireHub\Core\Support\LowLevel\Arr;
+
+/**
+ * ### Array Hash Engine
+ *
+ * Simple PHP array-backed hash table engine.
+ * Fast, memory-resident, no collision strategy beyond PHP array behavior.
+ * @since 1.0.0
+ *
+ * @template TKey of array-key
+ * @template TValue
+ *
+ * @implements \FireHub\Core\Support\DataStructure\Storage\HashEngine
+ */
+final class ArrHashEngine implements HashEngine {
+
+ /**
+ * ### Underlying data
+ * @since 1.0.0
+ *
+ * @var array
+ */
+ private array $data = [];
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ */
+ public function iterate ():iterable {
+
+ return $this->data;
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\LowLevel\Arr::count() To count the number of elements in the storage.
+ */
+ public function size ():int {
+
+ return Arr::count($this->data);
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\LowLevel\Arr::keyExists() To check if a key exists in the hash engine.
+ */
+ public function has (int|string $key):bool {
+
+ return Arr::keyExists($key, $this->data);
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\ArrMapStorage::has() To check if key exists.
+ */
+ public function get (int|string $key):Maybe {
+
+ return $this->has($key)
+ ? Maybe::some($this->data[$key]) // @phpstan-ignore offsetAccess.notFound
+ : Maybe::none();
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\ArrListStorage::has() To check if index exists.
+ */
+ public function set (int|string $key, mixed $value):MutationOutcome {
+
+ $exists = $this->has($key);
+
+ $this->data[$key] = $value;
+
+ return $exists
+ ? MutationOutcome::UPDATED
+ : MutationOutcome::CREATED;
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\ArrListStorage::has() To check if index exists.
+ */
+ public function remove (int|string $key):MutationOutcome {
+
+ $exists = $this->has($key);
+
+ unset($this->data[$key]);
+
+ return $exists
+ ? MutationOutcome::REMOVED
+ : MutationOutcome::NOT_FOUND;
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/firehub.GeneratorStorage.php b/src/support/datastructure/storage/firehub.GeneratorStorage.php
new file mode 100644
index 00000000..81d8f9c5
--- /dev/null
+++ b/src/support/datastructure/storage/firehub.GeneratorStorage.php
@@ -0,0 +1,82 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.2
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage;
+
+use FireHub\Core\Support\DataStructure\Storage;
+use FireHub\Core\Support\DataStructure\Storage\Initialization\GeneratorStorageInitializer;
+use FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy\GeneratorCallbackInitializer;
+use FireHub\Core\Support\DataStructure\Storage\Capability\Convertible;
+
+/**
+ * ### Lazy Generator-Based Storage
+ *
+ * A read-optimized storage implementation based on PHP generators. Designed for streaming large or infinite datasets
+ * where materialization is not required. Does not guarantee rewinding or persistent state beyond iteration, making
+ * it suitable for pipeline-based or lazy evaluation scenarios.
+ * @since 1.0.0
+ *
+ * @template TKey
+ * @template TValue
+ *
+ * @implements \FireHub\Core\Support\DataStructure\Storage
+ * @implements \FireHub\Core\Support\DataStructure\Storage\Capability\Convertible
+ */
+final readonly class GeneratorStorage implements Storage, Convertible {
+
+ /**
+ * ### Constructor
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\Initialization\GeneratorStorageInitializer As parameter.
+ *
+ * @param \FireHub\Core\Support\DataStructure\Storage\Initialization\GeneratorStorageInitializer $initializer
+ * Initial data to store.
+ *
+ *
+ * @return void
+ */
+ public function __construct (
+ private GeneratorStorageInitializer $initializer
+ ) {}
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy\GeneratorCallbackInitializer To
+ * convert the storage to a generator.
+ * @uses \FireHub\Core\Support\DataStructure\Storage::iterate() To retrieve an iterable of the elements in the
+ * storage.
+ */
+ public static function fromStorage (Storage $storage):static {
+
+ return new self(
+ new GeneratorCallbackInitializer(fn() => yield from $storage->iterate())
+ );
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ */
+ public function iterate ():iterable {
+
+ return ($this->initializer)();
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/firehub.HashEngine.php b/src/support/datastructure/storage/firehub.HashEngine.php
new file mode 100644
index 00000000..1e149860
--- /dev/null
+++ b/src/support/datastructure/storage/firehub.HashEngine.php
@@ -0,0 +1,123 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage;
+use FireHub\Core\Shared\Type\Maybe;
+use FireHub\Core\Shared\Enums\MutationOutcome;
+
+/**
+ * ### Hash Engine Contract
+ *
+ * Low-level storage strategy for HashStorage.
+ * Responsible for actual key-value persistence logic.
+ *
+ * @template TKey of int|string
+ * @template TValue
+ */
+interface HashEngine {
+
+ /**
+ * ### Traverses Hash Engine data
+ *
+ * Provides a unified, read-only traversal contract for accessing all elements within a Hash Engine implementation.
+ * @since 1.0.0
+ *
+ * @return iterable
+ */
+ public function iterate ():iterable;
+
+ /**
+ * ### Retrieve the number of elements stored in the hash engine
+ * @since 1.0.0
+ *
+ * @return non-negative-int The number of elements stored in the hash engine.
+ */
+ public function size ():int;
+
+ /**
+ * ### Check Key Existence
+ *
+ * Determines whether a value exists for the specified key in the hash engine. Provides a fast existence check
+ * without retrieving the underlying value, enabling safe conditional access patterns.
+ * @since 1.0.0
+ *
+ * @param TKey $key
+ * The key to check for existence.
+ *
+ *
+ * @return bool True if the key exists, false otherwise.
+ */
+ public function has (int|string $key):bool;
+
+ /**
+ * ### Retrieve Value by Key
+ *
+ * Retrieves the value associated with the given key from an associative hash engine. If the key does not
+ * exist, an empty Maybe is returned instead of null, ensuring explicit handling of missing entries. This operation
+ * does not modify the hash engine and is designed for safe, read-only access to key-based data mappings such as
+ * dictionaries, maps, and registries.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Shared\Type\Maybe As return.
+ *
+ * @param TKey $key
+ * The key to retrieve value by key.
+ *
+ *
+ * @return \FireHub\Core\Shared\Type\Maybe|\FireHub\Core\Shared\Type\Maybe Maybe with element at key
+ * position of the hash engine, or Maybe with null if element at key position of the hash engine doesn't exist.
+ */
+ public function get (int|string $key):Maybe;
+
+ /**
+ * ### Set Value by Key
+ *
+ * Assigns a value to the specified key in the associative hash engine. If the key already exists, the existing
+ * value is overwritten. If it does not exist, a new entry is created. This operation is fundamental for
+ * key-value-based structures and does not involve positional logic or traversal.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Shared\Enums\MutationOutcome As return.
+ *
+ * @param TKey $key
+ * The key where the value will be added.
+ *
+ * @param TValue $value
+ * Value to add to the key.
+ *
+ *
+ * @return \FireHub\Core\Shared\Enums\MutationOutcome::CREATED|\FireHub\Core\Shared\Enums\MutationOutcome::UPDATED
+ * An enum indicating the result of the mutation operation.
+ */
+ public function set (int|string $key, mixed $value):MutationOutcome;
+
+ /**
+ * ### Remove Value by Key
+ *
+ * Removes the entry associated with the specified key from the hash engine. If the key does not exist, the operation
+ * has no effect. This mutation affects only the associative mapping layer and does not depend on element ordering
+ * or structural position.
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Shared\Enums\MutationOutcome As return.
+ *
+ * @param TKey $key
+ * The key of the value to remove.
+ *
+ *
+ * @return \FireHub\Core\Shared\Enums\MutationOutcome::REMOVED|\FireHub\Core\Shared\Enums\MutationOutcome::NOT_FOUND
+ * An enum indicating the result of the mutation operation.
+ */
+ public function remove (int|string $key):MutationOutcome;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/firehub.HashStorage.php b/src/support/datastructure/storage/firehub.HashStorage.php
new file mode 100644
index 00000000..5992e410
--- /dev/null
+++ b/src/support/datastructure/storage/firehub.HashStorage.php
@@ -0,0 +1,239 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.2
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage;
+
+use FireHub\Core\Support\DataStructure\Storage;
+use FireHub\Core\Support\DataStructure\Storage\Capability\ {
+ Cloneable, Convertible, KeyAccess, KeyMutation, StorageMetricsAware
+};
+use FireHub\Core\Support\DataStructure\Storage\Engine\ArrHashEngine;
+use FireHub\Core\Shared\Type\Maybe;
+use FireHub\Core\Shared\Enums\MutationOutcome;
+use FireHub\Core\Throwable\Exception\Support\DataStructure\ {
+ InvalidEngineException, InvalidKeyException
+};
+use FireHub\Core\Support\LowLevel\ {
+ ClsObj, DataIs
+};
+
+/**
+ * ### Hash-based Key-Value Storage with Pluggable Engine Architecture
+ *
+ * A key-value storage abstraction that provides associative data management using a pluggable hashing engine. It
+ * decouples the storage API from the underlying implementation (such as array-based maps, HAMT, open addressing, or
+ * Robin Hood hashing), allowing runtime strategy switching while preserving consistent Map/Set semantics.
+ *
+ * @template TKey of array-key
+ * @template TValue
+ *
+ * @implements \FireHub\Core\Support\DataStructure\Storage
+ * @implements \FireHub\Core\Support\DataStructure\Storage\Capability\Convertible
+ * @implements \FireHub\Core\Support\DataStructure\Storage\Capability\KeyAccess
+ * @implements \FireHub\Core\Support\DataStructure\Storage\Capability\KeyMutation
+ */
+final readonly class HashStorage implements Storage, Convertible, Cloneable, StorageMetricsAware, KeyAccess,
+ KeyMutation {
+
+ /**
+ * ### Hash Engine
+ * @since 1.0.0
+ *
+ * @var \FireHub\Core\Support\DataStructure\Storage\HashEngine
+ */
+ private HashEngine $engine;
+
+ /**
+ * ### Constructor
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\HashEngine As parameter.
+ * @uses \FireHub\Core\Support\DataStructure\Storage\Engine\ArrHashEngine As default hash engine.
+ *
+ * @param null|\FireHub\Core\Support\DataStructure\Storage\HashEngine $engine [optional]
+ * Hash Engine.
+ *
+ *
+ * @return void
+ */
+ public function __construct (?HashEngine $engine = null) {
+
+ $this->engine = $engine ?? new ArrHashEngine();
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage::iterate() To retrieve an iterable of the elements in the
+ * storage.
+ *
+ * @param class-string<\FireHub\Core\Support\DataStructure\Storage\HashEngine> $engine [optional]
+ * Hash engine to use.
+ *
+ *
+ * @throws \FireHub\Core\Shared\Contracts\Throwable
+ * @throws \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidKeyException If key is invalid.
+ * @throws \FireHub\Core\Throwable\Exception\Support\DataStructure\InvalidEngineException If engine is invalid.
+ */
+ public static function fromStorage (Storage $storage, string $engine = Storage\Engine\ArrHashEngine::class):static {
+
+ $engine = ClsObj::ofClass($engine, HashEngine::class)
+ ? new $engine
+ : throw InvalidEngineException::builder()
+ ->withContext([
+ 'engine' => $engine
+ ])
+ ->build();
+
+ foreach ($storage->iterate() as $key => $value) {
+
+ if (!DataIs::int($key) && !DataIs::string($key))
+ throw InvalidKeyException::builder()
+ ->withContext([
+ 'key' => $key
+ ])
+ ->build();
+
+ $engine->set($key, $value);
+
+ }
+
+
+ return new self($engine); // @phpstan-ignore return.type
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\HashEngine::iterate() To traverse Hash Engine data.
+ */
+ public function iterate ():iterable {
+
+ return $this->engine->iterate();
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\HashEngine::iterate() To traverse hash engine data.
+ * @uses \FireHub\Core\Support\DataStructure\Storage\HashEngine::set() To set Value by Key in the engine.
+ */
+ public function copy ():static {
+
+ $engine = new $this->engine;
+
+ foreach ($this->engine->iterate() as $key => $value)
+ $engine->set($key, $value);
+
+ return new self($engine);
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ */
+ public function capacity ():null {
+
+ return null;
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ */
+ public function availableCapacity ():null {
+
+ return null;
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\HashEngine::size() To get number of elements stored in the
+ * hash engine.
+ */
+ public function size ():int {
+
+ return $this->engine->size();
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\HashEngine::has() To check Key existence in the engine.
+ */
+ public function has (int|string $key):bool {
+
+ return $this->engine->has($key);
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\HashStorage::get() To check if key exists in the engine.
+ */
+ public function get (int|string $key):Maybe {
+
+ return $this->engine->get($key);
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\HashStorage::set() To set Value by Key in the engine.
+ */
+ public function set (int|string $key, mixed $value):MutationOutcome {
+
+ return $this->engine->set($key, $value);
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\HashEngine::remove() To remove Value by Key in the engine.
+ */
+ public function remove (int|string $key):MutationOutcome {
+
+ return $this->engine->remove($key);
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/firehub.ListStorage.php b/src/support/datastructure/storage/firehub.ListStorage.php
new file mode 100644
index 00000000..437df400
--- /dev/null
+++ b/src/support/datastructure/storage/firehub.ListStorage.php
@@ -0,0 +1,332 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.1
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage;
+
+use FireHub\Core\Support\DataStructure\Storage;
+use FireHub\Core\Support\DataStructure\Storage\Initialization\ListStorageInitializer;
+use FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy\ListCallbackInitializer;
+use FireHub\Core\Support\DataStructure\Storage\Capability\ {
+ Cloneable, Convertible, DequeMutation, IndexAccess, IndexMutation, LinearBoundaryAccess, StorageMetricsAware
+};
+use FireHub\Core\Shared\Type\Maybe;
+use FireHub\Core\Shared\Enums\MutationOutcome;
+use FireHub\Core\Support\LowLevel\ {
+ Arr, Math
+};
+
+/**
+ * ### Array-Based List Storage
+ *
+ * A mutable sequential storage implementation backed by a native array structure. Represents an ordered list of
+ * elements with integer-indexed access and preserves insertion order. Supports fast append operations, indexed
+ * mutation, and controlled front and back insertions/removals with predictable performance characteristics. Designed
+ * for general-purpose list-based collections where ordered iteration and positional access are primary requirements.
+ * @since 1.0.0
+ *
+ * @template TValue
+ *
+ * @implements \FireHub\Core\Support\DataStructure\Storage
+ * @implements \FireHub\Core\Support\DataStructure\Storage\Capability\Convertible
+ * @implements \FireHub\Core\Support\DataStructure\Storage\Capability\LinearBoundaryAccess
+ * @implements \FireHub\Core\Support\DataStructure\Storage\Capability\DequeMutation
+ * @implements \FireHub\Core\Support\DataStructure\Storage\Capability\IndexAccess
+ * @implements \FireHub\Core\Support\DataStructure\Storage\Capability\IndexMutation
+ */
+final class ListStorage implements Storage, Convertible, Cloneable, StorageMetricsAware, LinearBoundaryAccess,
+ DequeMutation, IndexAccess, IndexMutation {
+
+ /**
+ * ### Underlying data storage
+ * @since 1.0.0
+ *
+ * @var array
+ */
+ private array $data = [];
+
+ /**
+ * ### Constructor
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\Initialization\ListStorageInitializer As parameter.
+ * @uses \FireHub\Core\Support\LowLevel\Arr::values() To convert the array keys to integers.
+ *
+ * @param null|\FireHub\Core\Support\DataStructure\Storage\Initialization\ListStorageInitializer $initializer [optional]
+ * Initial data to store.
+ *
+ *
+ * @return void
+ */
+ public function __construct (?ListStorageInitializer $initializer = null) {
+
+ if ($initializer !== null) $this->data = Arr::values($initializer());
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy\ListCallbackInitializer To
+ * convert the storage to an array.
+ * @uses \FireHub\Core\Support\DataStructure\Storage::iterate() To retrieve an iterable of the elements in the
+ * storage.
+ */
+ public static function fromStorage (Storage $storage):static {
+
+ return new self(
+ new ListCallbackInitializer(function () use ($storage) {
+
+ $values = [];
+ foreach ($storage->iterate() as $value)
+ $values[] = $value;
+
+ return $values;
+
+ })
+ );
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ */
+ public function iterate ():iterable {
+
+ /** @var array */
+ return $this->data;
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ */
+ public function copy ():static {
+
+ $clone = new static();
+
+ $clone->data = [];
+
+ foreach ($this->data as $value)
+ $clone->data[] = $value;
+
+ /** @var static */
+ return $clone;
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ */
+ public function capacity ():null {
+
+ return null;
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ */
+ public function availableCapacity ():null {
+
+ return null;
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\LowLevel\Arr::count() To count the number of elements in the storage.
+ */
+ public function size ():int {
+
+ return Arr::count($this->data);
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\LowLevel\Arr::first() To get the first element in the storage.
+ */
+ public function first ():Maybe {
+
+ if ($this->data === []) return Maybe::none();
+
+ /** @var TValue $first */
+ $first = Arr::first($this->data);
+
+ return Maybe::some($first);
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\LowLevel\Arr::last() To get the last element in the storage.
+ */
+ public function last ():Maybe {
+
+ if ($this->data === []) return Maybe::none();
+
+ /** @var TValue $last */
+ $last = Arr::last($this->data);
+
+ return Maybe::some($last);
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @uses \FireHub\Core\Support\LowLevel\Arr::unshift() To prepend values to the beginning of the array.
+ *
+ * @since 1.0.0
+ */
+ public function addFirst (mixed ...$values):static {
+
+ Arr::unshift($this->data, ...$values);
+
+ return $this;
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @uses \FireHub\Core\Support\LowLevel\Arr::push() To append values to the end of the array.
+ *
+ * @since 1.0.0
+ */
+ public function addLast (mixed ...$values):static {
+
+ Arr::push($this->data, ...$values);
+
+ return $this;
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\LowLevel\Arr::slice() To remove first items from the array.
+ * @uses \FireHub\Core\Support\LowLevel\Math::max() To ensure the number of items to remove is not negative.
+ */
+ public function removeFirst (int $items = 1):static {
+
+ $this->data = Arr::slice($this->data, Math::max($items, 0));
+
+ return $this;
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\LowLevel\Arr::pop() To remove last items from the array.
+ */
+ public function removeLast (int $items = 1):static {
+
+ while ($items-- > 0)
+ Arr::pop($this->data);
+
+ return $this;
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\LowLevel\Arr::keyExists() To check if a key exists in the storage.
+ */
+ public function has (int $index):bool {
+
+ return Arr::keyExists($index, $this->data);
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\ListStorage::has() To check if index exists.
+ */
+ public function get (int $index):Maybe {
+
+ return $this->has($index)
+ ? Maybe::some($this->data[$index]) // @phpstan-ignore offsetAccess.notFound
+ : Maybe::none();
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\ListStorage::has() To check if index exists.
+ */
+ public function set (int $index, mixed $value):MutationOutcome {
+
+ $outcome = $this->has($index)
+ ? MutationOutcome::UPDATED
+ : MutationOutcome::CREATED;
+
+ $this->data[$index] = $value;
+
+ return $outcome;
+
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage\ListStorage::has() To check if index exists.
+ */
+ public function remove (int $index):MutationOutcome {
+
+ $outcome = $this->has($index)
+ ? MutationOutcome::REMOVED
+ : MutationOutcome::NOT_FOUND;
+
+ unset($this->data[$index]);
+
+ return $outcome;
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/firehub.Node.php b/src/support/datastructure/storage/firehub.Node.php
new file mode 100644
index 00000000..054367b2
--- /dev/null
+++ b/src/support/datastructure/storage/firehub.Node.php
@@ -0,0 +1,47 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage;
+
+use FireHub\Core\Support\DataStructure\Storage;
+
+/**
+ * ### Base Storage Node Contract
+ *
+ * A minimal structural contract representing a node inside a storage implementation. It defines only value ownership
+ * semantics without imposing any constraints on linkage, traversal, or topology.
+ * @since 1.0.0
+ *
+ * @template TValue
+ */
+interface Node {
+
+ /**
+ * ### Retrieves the storage instance that owns this node
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\DataStructure\Storage As return.
+ *
+ * @return \FireHub\Core\Support\DataStructure\Storage Storage instance that owns this node.
+ */
+ public function owner ():Storage;
+
+ /**
+ * ### Get the value contained in this node
+ * @since 1.0.0
+ *
+ * @return TValue The value contained in this node.
+ */
+ public function value ():mixed;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/handle/firehub.NodeHandle.php b/src/support/datastructure/storage/handle/firehub.NodeHandle.php
new file mode 100644
index 00000000..3fe4d007
--- /dev/null
+++ b/src/support/datastructure/storage/handle/firehub.NodeHandle.php
@@ -0,0 +1,59 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.2
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Handle;
+
+use FireHub\Core\Support\DataStructure\Storage\Node;
+
+/**
+ * ### Opaque Storage Node Handle
+ *
+ * A lightweight, immutable reference that uniquely identifies and encapsulates a node within a storage structure.
+ * The handle acts as a stable external pointer to an internal node without exposing its implementation details or
+ * allowing direct structural manipulation. It is bound to a specific storage instance and is intended to be used as a
+ * safe token for node-based operations such as mutation, retrieval, or structural navigation through controlled APIs.
+ * NodeHandle does not provide traversal capabilities and does not represent a cursor in the navigational sense.
+ * Instead, it serves purely as an identity-safe bridge between external API consumers and internal storage topology.
+ * @since 1.0.0
+ *
+ * @template TValue
+ */
+final readonly class NodeHandle {
+
+ /**
+ * ### Constructor
+ * @since 1.0.0
+ *
+ * @param \FireHub\Core\Support\DataStructure\Storage\Node $node
+ * The node to be encapsulated by the handle.
+ *
+ *
+ * @return void
+ */
+ public function __construct (
+ private Node $node
+ ) {}
+
+ /**
+ * ### Get encapsulated node
+ * @since 1.0.0
+ *
+ * @return \FireHub\Core\Support\DataStructure\Storage\Node Encapsulated node.
+ */
+ public function node ():Node {
+
+ return $this->node;
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/initialization/firehub.GeneratorStorageInitializer.php b/src/support/datastructure/storage/initialization/firehub.GeneratorStorageInitializer.php
new file mode 100644
index 00000000..0a68325c
--- /dev/null
+++ b/src/support/datastructure/storage/initialization/firehub.GeneratorStorageInitializer.php
@@ -0,0 +1,39 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Initialization;
+
+use Generator;
+
+/**
+ * ### Generator Storage Initializer
+ *
+ * Defines a contract for initializing generator-based storage by producing an iterable data stream. Enables
+ * deferred, memory-efficient data provisioning through generators while maintaining a consistent and encapsulated
+ * initialization interface for streaming storage implementations.
+ * @since 1.0.0
+ *
+ * @template TKey
+ * @template TValue
+ */
+interface GeneratorStorageInitializer {
+
+ /**
+ * ### Invoke Initializer
+ * @since 1.0.0
+ *
+ * @return Generator Underlying data for storage.
+ */
+ public function __invoke ():Generator;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/initialization/firehub.ListStorageInitializer.php b/src/support/datastructure/storage/initialization/firehub.ListStorageInitializer.php
new file mode 100644
index 00000000..2e418885
--- /dev/null
+++ b/src/support/datastructure/storage/initialization/firehub.ListStorageInitializer.php
@@ -0,0 +1,38 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 7.0
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Initialization;
+
+/**
+ * ### List Storage Initializer
+ *
+ * Provides a strategy for initializing the internal array of an ListStorage instance during construction. Enables
+ * controlled, potentially lazy, or computed population of the underlying data structure while preserving encapsulation
+ * and avoiding direct array injection. Suitable for large datasets, dynamic generation, or deferred materialization
+ * patterns.
+ * @since 1.0.0
+ *
+ * @template TKey of array-key
+ * @template TValue
+ */
+interface ListStorageInitializer {
+
+ /**
+ * ### Invoke Initializer
+ * @since 1.0.0
+ *
+ * @return array Underlying data for storage.
+ */
+ public function __invoke ():array;
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/initialization/strategy/firehub.GeneratorCallbackInitializer.php b/src/support/datastructure/storage/initialization/strategy/firehub.GeneratorCallbackInitializer.php
new file mode 100644
index 00000000..109bdff7
--- /dev/null
+++ b/src/support/datastructure/storage/initialization/strategy/firehub.GeneratorCallbackInitializer.php
@@ -0,0 +1,59 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.2
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy;
+
+use FireHub\Core\Support\DataStructure\Storage\Initialization\GeneratorStorageInitializer;
+use Closure, Generator;
+
+/**
+ * ### Generator Callback Initializer
+ *
+ * A concrete GeneratorStorageInitializer implementation that delegates data stream creation to a user-provided
+ * callback. Executes the callback to return a generator or iterable sequence, allowing dynamic, lazy, and
+ * memory-efficient data generation while preserving a uniform initialization contract.
+ * @since 1.0.0
+ *
+ * @template TKey
+ * @template TValue
+ *
+ * @implements \FireHub\Core\Support\DataStructure\Storage\Initialization\GeneratorStorageInitializer
+ */
+final readonly class GeneratorCallbackInitializer implements GeneratorStorageInitializer {
+
+ /**
+ * ### Constructor
+ * @since 1.0.0
+ *
+ * @param Closure():Generator $callback
+ * A callback function that returns an Generator of key-value pairs to be used as the underlying dataset.
+ *
+ *
+ * @return void
+ */
+ public function __construct(
+ private Closure $callback
+ ) {}
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ */
+ public function __invoke ():Generator {
+
+ return ($this->callback)();
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/initialization/strategy/firehub.ListCallbackInitializer.php b/src/support/datastructure/storage/initialization/strategy/firehub.ListCallbackInitializer.php
new file mode 100644
index 00000000..ff938623
--- /dev/null
+++ b/src/support/datastructure/storage/initialization/strategy/firehub.ListCallbackInitializer.php
@@ -0,0 +1,59 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.2
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy;
+
+use FireHub\Core\Support\DataStructure\Storage\Initialization\ListStorageInitializer;
+use Closure;
+
+/**
+ * ### Initialize an array using a value-generating callback
+ *
+ * A concrete ListStorageInitializer implementation that delegates array creation to a user-provided callback.
+ * Executes the callback during initialization to produce the underlying dataset, enabling flexible, dynamic, or
+ * computed data generation while preserving a consistent initialization contract.
+ * @since 1.0.0
+ *
+ * @template TKey of array-key
+ * @template TValue
+ *
+ * @implements \FireHub\Core\Support\DataStructure\Storage\Initialization\ListStorageInitializer
+ */
+final readonly class ListCallbackInitializer implements ListStorageInitializer {
+
+ /**
+ * ### Constructor
+ * @since 1.0.0
+ *
+ * @param Closure():array $callback
+ * A callback function that returns an array of key-value pairs to be used as the underlying dataset.
+ *
+ *
+ * @return void
+ */
+ public function __construct(
+ private Closure $callback
+ ) {}
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ */
+ public function __invoke ():array {
+
+ return ($this->callback)();
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/initialization/strategy/firehub.ListFillInitializer.php b/src/support/datastructure/storage/initialization/strategy/firehub.ListFillInitializer.php
new file mode 100644
index 00000000..7b2816da
--- /dev/null
+++ b/src/support/datastructure/storage/initialization/strategy/firehub.ListFillInitializer.php
@@ -0,0 +1,71 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.2
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy;
+
+use FireHub\Core\Support\DataStructure\Storage\Initialization\ListStorageInitializer;
+use FireHub\Core\Support\LowLevel\Arr;
+
+/**
+ * ### Initialize an array by filling it with a repeated value
+ *
+ * Creates an array of a defined size where each element is initialized with the same value. Useful for pre-allocating
+ * collections, setting default states, or bootstrapping predictable datasets (e.g., fixed-size buffers, placeholders,
+ * or test fixtures). The initializer ensures consistent indexing and value assignment across the entire range,
+ * providing a fast and deterministic way to populate storage.
+ * @since 1.0.0
+ *
+ * @template TValue
+ *
+ * @implements \FireHub\Core\Support\DataStructure\Storage\Initialization\ListStorageInitializer
+ */
+final readonly class ListFillInitializer implements ListStorageInitializer {
+
+ /**
+ * ### Constructor
+ * @since 1.0.0
+ *
+ * @param TValue $value
+ * Value to use for filling.
+ *
+ * @param int $start_index
+ * The first index of the returned array.
+ *
+ * @param int<0, 2147483647> $length
+ * Number of elements to insert. Must be greater than or equal to zero.
+ *
+ *
+ * @return void
+ */
+ public function __construct(
+ private mixed $value,
+ private int $start_index,
+ private int $length
+ ) {}
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\LowLevel\Arr::fill() To fill an array with values.
+ *
+ * @throws \FireHub\Core\Throwable\Error\LowLevel\Arr\OutOfRangeError If $length is out of range.
+ */
+ public function __invoke ():array {
+
+ return Arr::fill($this->value, $this->start_index, $this->length);
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/storage/initialization/strategy/firehub.ListRangeInitializer.php b/src/support/datastructure/storage/initialization/strategy/firehub.ListRangeInitializer.php
new file mode 100644
index 00000000..8deb8c1b
--- /dev/null
+++ b/src/support/datastructure/storage/initialization/strategy/firehub.ListRangeInitializer.php
@@ -0,0 +1,95 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.2
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Storage\Initialization\Strategy;
+
+use FireHub\Core\Support\DataStructure\Storage\Initialization\ListStorageInitializer;
+use FireHub\Core\Throwable\Exception\Support\DataStructure\OutOfBoundsException;
+use FireHub\Core\Throwable\Error\LowLevel\Arr\OutOfRangeError;
+use FireHub\Core\Support\LowLevel\Arr;
+
+/**
+ * ### Generate a sequential array from a numeric or string range
+ *
+ * Creates a contiguous sequence of values between a defined start and end boundary, optionally using a custom step.
+ * Useful for quickly bootstrapping collections with predictable numeric keys or values (e.g., index ranges, pagination
+ * offsets, test datasets). The initializer ensures consistent ordering and supports both ascending and descending
+ * ranges, depending on the provided step.
+ * @since 1.0.0
+ *
+ * @template TValue of float|int|string
+ *
+ * @implements \FireHub\Core\Support\DataStructure\Storage\Initialization\ListStorageInitializer
+ */
+final readonly class ListRangeInitializer implements ListStorageInitializer {
+
+ /**
+ * ### Constructor
+ * @since 1.0.0
+ *
+ * @param TValue $start
+ * The starting value of the range.
+ *
+ * @param TValue $end
+ * The ending value of the range.
+ *
+ * @param (TValue is float ? float : int|float) $step [optional]
+ * The step size between each value in the range. Defaults to 1.
+ *
+ *
+ * @return void
+ */
+ public function __construct(
+ private int|float|string $start,
+ private int|float|string $end,
+ private int|float $step = 1
+ ) {}
+
+ /**
+ * @inheritDoc
+ *
+ * @since 1.0.0
+ *
+ * @uses \FireHub\Core\Support\LowLevel\Arr::range() To create an array containing a range of elements.
+ *
+ * @throws \FireHub\Core\Shared\Contracts\Throwable
+ * @throws \FireHub\Core\Throwable\Exception\Support\DataStructure\OutOfBoundsException If $step is 0, $start, $end,
+ * or $step is not finite, or $step is negative, but the produced range is increasing (in other words, $start <=
+ * $end), or if one is string, but not both.
+ *
+ * @note Character sequence values are limited to a length of one.
+ * If a length greater than one is entered only the first character is used.
+ */
+ public function __invoke ():array {
+
+ try {
+
+ /** @var array */
+ return Arr::range($this->start, $this->end, $this->step);
+
+ } catch (OutOfRangeError $error) {
+
+ throw OutOfBoundsException::builder()
+ ->withMessage($error->getMessage())
+ ->withContext([
+ 'start' => $this->start,
+ 'end' => $this->end,
+ 'step' => $this->step
+ ])
+ ->build();
+
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/support/datastructure/structure/firehub.Map.php b/src/support/datastructure/structure/firehub.Map.php
new file mode 100644
index 00000000..2d35620d
--- /dev/null
+++ b/src/support/datastructure/structure/firehub.Map.php
@@ -0,0 +1,499 @@
+
+ * @copyright 2026 The FireHub Project - All rights reserved
+ * @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
+ *
+ * @php-version 8.1
+ * @package Core\Support
+ */
+
+namespace FireHub\Core\Support\DataStructure\Structure;
+
+use FireHub\Core\Support\Contracts\DataStructure;
+use FireHub\Core\Support\DataStructure\Structure\Snapshot\MapSnapshot;
+use FireHub\Core\Support\DataStructure\Abstraction\Collection;
+use FireHub\Core\Support\DataStructure\Type\Associative;
+use FireHub\Core\Support\DataStructure\Capability\ {
+ Copyable, Countable, Forkable, Freezable, Rebuildable, Rehydratable, Snapshotable
+};
+use FireHub\Core\Support\DataStructure\Runtime\ {
+ HasCopyOnWriteState, HasFreezeState, StructureState
+};
+use FireHub\Core\Support\DataStructure\DTO\ {
+ DehydratedState, StateHeader
+};
+use FireHub\Core\Support\DataStructure\Storage;
+use FireHub\Core\Support\DataStructure\Storage\Capability\ {
+ Cloneable, KeyAccess, KeyMutation, StorageMetricsAware
+};
+use FireHub\Core\Shared\Type\Maybe;
+use FireHub\Core\Shared\Enums\MutationOutcome;
+use FireHub\Core\Throwable\Exception\Support\DataStructure\ {
+ InvalidDataStructureException, InvalidKeyException, InvalidStorageException
+};
+use FireHub\Core\Support\LowLevel\ClsObj;
+use Traversable;
+
+/**
+ * ### Map — Key-Value Associative Data Structure
+ *
+ * A map is an associative data structure that stores values indexed by unique keys.
+ * It provides fast lookup, insertion, and deletion by key rather than position.
+ *
+ * Unlike linear collections (Vector, List), Map does not expose positional ordering semantics as its primary model
+ * but may optionally preserve insertion order depending on implementation.
+ * @since 1.0.0
+ *
+ * @template TKey of array-key
+ * @template TValue
+ *
+ * @implements \FireHub\Core\Support\Contracts\DataStructure
+ * @implements \FireHub\Core\Support\DataStructure\Abstraction\Collection
+ * @implements \FireHub\Core\Support\DataStructure\Type\Associative
+ * @implements \FireHub\Core\Support\DataStructure\Capability\Snapshotable
+ * @implements \FireHub\Core\Support\DataStructure\Capability\Rehydratable