Repository navigation
Internals Storage
Framework Internals · Developer guide
Storage is a facade for genuine PHP uploads and downloads. It validates upload arrays, stages files under the storage root, builds metadata and delegates registration to StorageManager. uploadMultiple is sequential and not atomic. StorageManager delegates filesystem operations, repositories and ownership strategy decisions, attempting restoration when metadata persistence fails.
StorageRepository hydrates StorageEntry from awt_storage and provides ID/name/owner filtering and persistence. Default PackageOwnerStorageStrategy supplies package paths; USER/SYSTEM enum cases have no default strategy. StorageEntry URLs select the ID and encode the display filename. StorageAccess authorizes registered middleware before download or default HTTP serving; explicit false denies only in this storage pipeline.
Resource builds package filename maps through ResourceBuilder and resolves filename/path/Package:path aliases. It rejects traversal and missing required resources. ResourceCache watches package roots using the framework cache. Internal resource lookup intentionally includes source; PublicResource independently checks realpath containment, hidden segments, extensions and public directories before HTTP exposure.
TransientStorage knows cache/temp roots and relative subpools. It rejects traversal/absolute paths but is not a full universal filesystem jail for arbitrary caller-provided entries/symlinks. TransientStorageEntry atomically replaces trusted file content through a random temporary file, flush/rename and opcache invalidation. JSON arrays encode JSON; other arrays generate PHP return files. PHP/CACHE reads execute includes, so cache roots must remain trusted.
Cache caches pools statically within the process and stores hashed-key payload files with version/time/validation/roots/snapshot/data. Reads validate each entry's recorded policy, delete stale/corrupt payloads and return false. EXPIRE is one hour, EXPIRE_LONGER one day; MODIFIED/HASH recursively inspect file/directory snapshots. Directory links are not recursively followed in resource maps/watches; missing roots and additions/removals invalidate snapshots.
Database internals covers DatabaseCache's table/query index and commit-time invalidation separately.
-
Vfs-Cache-Cache —
awt_src/classes/vfs/cache/Cache.php -
Vfs-Cache-CacheEntry —
awt_src/classes/vfs/cache/CacheEntry.php -
Vfs-Cache-CachePool —
awt_src/classes/vfs/cache/CachePool.php -
Vfs-Cache-Enums-ECacheValidation —
awt_src/classes/vfs/cache/enums/ECacheValidation.php -
Vfs-Resource-PublicResource —
awt_src/classes/vfs/resource/PublicResource.php -
Vfs-Resource-Resource —
awt_src/classes/vfs/resource/Resource.php -
Vfs-Resource-ResourceBuilder —
awt_src/classes/vfs/resource/ResourceBuilder.php -
Vfs-Resource-ResourceCache —
awt_src/classes/vfs/resource/ResourceCache.php -
Vfs-Resource-Event-ContextRequestEvent —
awt_src/classes/vfs/resource/event/ContextRequestEvent.php -
Vfs-Resource-Event-ContextSwitchEvent —
awt_src/classes/vfs/resource/event/ContextSwitchEvent.php -
Vfs-Resource-Exceptions-ResourceException —
awt_src/classes/vfs/resource/exceptions/ResourceException.php -
Vfs-Storage-FileName —
awt_src/classes/vfs/storage/FileName.php -
Vfs-Storage-Storage —
awt_src/classes/vfs/storage/Storage.php -
Vfs-Storage-StorageAccess —
awt_src/classes/vfs/storage/StorageAccess.php -
Vfs-Storage-StorageAccessDenied —
awt_src/classes/vfs/storage/StorageAccessDenied.php -
Vfs-Storage-StorageEntry —
awt_src/classes/vfs/storage/StorageEntry.php -
Vfs-Storage-StorageManager —
awt_src/classes/vfs/storage/StorageManager.php -
Vfs-Storage-StorageRepository —
awt_src/classes/vfs/storage/StorageRepository.php -
Vfs-Storage-Enums-EOwnerType —
awt_src/classes/vfs/storage/enums/EOwnerType.php -
Vfs-Storage-Interfaces-IFileSystemService —
awt_src/classes/vfs/storage/interfaces/IFileSystemService.php -
Vfs-Storage-Interfaces-IOwnerStorageStrategy —
awt_src/classes/vfs/storage/interfaces/IOwnerStorageStrategy.php -
Vfs-Storage-Interfaces-IStorageFacade —
awt_src/classes/vfs/storage/interfaces/IStorageFacade.php -
Vfs-Storage-Interfaces-IStorageManager —
awt_src/classes/vfs/storage/interfaces/IStorageManager.php -
Vfs-Storage-Interfaces-IStorageRepository —
awt_src/classes/vfs/storage/interfaces/IStorageRepository.php -
Vfs-Storage-Services-LocalFileSystemService —
awt_src/classes/vfs/storage/services/LocalFileSystemService.php -
Vfs-Storage-Strategies-PackageOwnerStorageStrategy —
awt_src/classes/vfs/storage/strategies/PackageOwnerStorageStrategy.php -
Vfs-Transient-TransientStorage —
awt_src/classes/vfs/transient/TransientStorage.php -
Vfs-Transient-TransientStorageEntry —
awt_src/classes/vfs/transient/TransientStorageEntry.php -
Vfs-Transient-Enums-ETransientType —
awt_src/classes/vfs/transient/enums/ETransientType.php -
Vfs-Transient-Interfaces-ITransientStorage —
awt_src/classes/vfs/transient/interfaces/ITransientStorage.php -
Vfs-Transient-Interfaces-ITransientStorageEntry —
awt_src/classes/vfs/transient/interfaces/ITransientStorageEntry.php
AWT Framework Wiki · Home · Installation Guide · Developer Guide · Framework Internals
Philosophy · Architecture · Known discrepancies · Verification
Installation Guide
Developer Guide
- Learning sequence
- First package
- Package structure
- Lifecycle
- Runtimes
- Events and objects
- Routing and controllers
- Views and resources
- Database and models
- Storage and caching
- Configuration and CLI
- Responses and errors
- Extension points
Framework Internals
- Architecture
- Bootstrap
- Packages
- Runtime
- Events and context
- Objects
- HTTP routing and controllers
- Rendering
- Blade integration
- Database
- Models
- Storage and caching
- Settings
- CLI
- Identity and sessions
- Responses
- Errors
- Complete source inventory
Documentation notes