Repository navigation
Internals Installer Package VersionCompare
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/installer/package/VersionCompare.php · Snapshot 8411f4287706.
Installation validates archives and manifests, moves files, persists metadata, copies data into storage, invokes an optional hook and emits an event. These operations do not form one atomic transaction.
use installer\interfaces\package\IVersionCompare;class VersionCompare implements IVersionCompareNo own constants, enum cases, traits or property declarations. Inherited members are documented on the parent reference page.
| Method | Signature |
|---|---|
| compare | public function compare(string $old, string $new): int |
| compareCompatibility | public function compareCompatibility(string $min, ?string $max = null): bool |
public function compare(string $old, string $new): int| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$old |
string $old |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
$new |
string $new |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
Return expressions (including local callbacks): version_compare($old, $new).
Implementation, validation guards and interaction order
/**
* @inheritDoc
*/
public function compare(string $old, string $new): int
{
return version_compare($old, $new);
}public function compareCompatibility(string $min, ?string $max = null): bool| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$min |
string $min |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
$max |
?string $max = null |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
Return expressions (including local callbacks): version_compare(AWT_VERSION, $min, '>=') && (!$max || version_compare(AWT_VERSION, $max, '<=')).
Implementation, validation guards and interaction order
/**
* @inheritDoc
*/
public function compareCompatibility(string $min, ?string $max = null): bool
{
return version_compare(AWT_VERSION, $min, '>=') && (!$max || version_compare(AWT_VERSION, $max, '<='));
}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