Repository navigation
Internals Vfs Storage StorageAccess
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/vfs/storage/StorageAccess.php · Snapshot 8411f4287706.
VFS includes package resource lookup, database-backed file metadata, filesystem collaborators, transient pools and persistent PHP-array caches.
use middleware\IMiddleware;final class StorageAccessNo own constants, enum cases, traits or property declarations. Inherited members are documented on the parent reference page.
| Method | Signature |
|---|---|
| authorize | public static function authorize(StorageEntry $entry): void |
public static function authorize(StorageEntry $entry): void| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$entry |
StorageEntry $entry |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
Return expressions (including local callbacks): void. Explicit false denies access. if ($middleware->handle() === false) throw new StorageAccessDenied('Storage access denied.').
Explicit exceptions: \LogicException, \RuntimeException, StorageAccessDenied. The guards in the implementation below show when each is raised; exceptions from collaborators also propagate unless caught.
Failure handling catches \Throwable.
Implementation, validation guards and interaction order
public static function authorize(StorageEntry $entry): void
{
$class = $entry->getMiddleware();
if ($class === null || $class === '') return;
try {
if (!class_exists($class) || !is_subclass_of($class, IMiddleware::class)) {
throw new \LogicException('Storage middleware must implement IMiddleware.');
}
$middleware = new $class();
} catch (\Throwable $e) {
throw new \RuntimeException('Unable to resolve storage middleware.', previous: $e);
}
// Existing middleware may redirect, throw, or return void. Explicit false denies access.
if ($middleware->handle() === false) throw new StorageAccessDenied('Storage access denied.');
}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