Repository navigation
Internals Bootstrap Dev
Framework Internals · Subsystem overview · Developer guide
Source: bootstrap/dev.php · Snapshot 8411f4287706.
Bootstrap scripts wire globals, constants and collaborators in a defined order. These files are executable entry points rather than a reusable class API.
use installer\package\Extractor;
use installer\package\PackageInstaller;
use installer\package\PackageMover;
use installer\package\PackageStorageTreeGenerator;
use package\facade\PackageFacade;
use vfs\storage\services\LocalFileSystemService;
use vfs\storage\StorageRepository;
use vfs\transient\TransientStorageEntry;
use setting\Config;The script below is executed by its caller. Constants, registered callbacks, global assignments, guards, included files and their order are preserved here. Unlike class methods, entry-point execution can start the CLI loop, route a request, emit output, or terminate the process.
<?php
use installer\package\Extractor;
use installer\package\PackageInstaller;
use installer\package\PackageMover;
use installer\package\PackageStorageTreeGenerator;
use package\facade\PackageFacade;
use vfs\storage\services\LocalFileSystemService;
use vfs\storage\StorageRepository;
use vfs\transient\TransientStorageEntry;
use setting\Config;
if (DEBUG && REMOTE_INSTALL_FOR_DEVS && $_SERVER['REQUEST_METHOD'] == 'POST' && $_SERVER['REQUEST_URI'] == '/dev/install') {
if (!isset($_FILES["package"]) || DEV_SECRET != $_POST["devSecret"]) {
die(WEB_NAME . ": Wrong dev secret, or missing file.");
}
try {
$file = $_FILES['package'];
if (($file['error'] ?? UPLOAD_ERR_OK) !== UPLOAD_ERR_OK || !is_uploaded_file($file['tmp_name'])) {
throw new RuntimeException('Package upload failed.');
}
$installer = new PackageInstaller(
new Extractor(new ZipArchive(), new TransientStorageEntry($file['name'], $file['tmp_name']), TEMP . 'dev_installer_'),
new PackageMover('', PACKAGES),
new PackageStorageTreeGenerator(new LocalFileSystemService(), new StorageRepository()),
(new PackageFacade())->getRepository()
);
if (($_POST['action'] ?? 'install') === 'update') {
if (!$installer->update()) throw new RuntimeException('Package update failed.');
} else {
$installer->execute();
}
} catch (Throwable $e) {
die($e->getMessage());
}
die("Installed on " . Config::getConfig("AWT", "Website Name")->getValue());
}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