InstallTask
MMO\admin\tasks · 1 symbol · generated 5 Oct 2026
InstallTask
InstallTask.php:34Create the target's folder layout, so every later task can assume it exists.
- Namespace
MMO\admin\tasks- Extends
- aDeployTask
- See
linkWebRootturns that path into a symlink onto{folder}/current/{publicPath}-- once, here, rather than on every deploy -- so from then on a shared webspace deploys and rolls back through exactly the same atomiccurrentswap as a machine we own; - on this machine (Target::isLocal) the vhost would be the developer's own Apache, andpostInstalla sudo run on their workstation.
Index
| LEGACY | what an earlier version kept in shared/, relative to it: its own state, and the tarballs. | |
| STAMP | The stamp, in the target's deploy/, of the templates and the command that last ran to the end on the target: a sha256 of what they wrote and ran, placeholders resolved. | |
| postInstall | ||
| sharedMode | ||
| templates | ||
| apply($context) | ||
| getDescription() | ||
| getExclusion($context) | ||
| getLegacyState($context) | ||
| getStamp($context, $files) | ||
| getStampFilename($context) | ||
| isNeeded($context) | Nothing to do once the layout is in place, the web root linked and the templates unchanged since they last ran -- which is the normal case on every deploy but the first. | |
| isProvisionNeeded($context) | ||
| isRealFolder($context, $path) | ||
| isWebRootLinked($context) | ||
| linkWebRoot($context) | Make the path the host serves resolve to the live release. | |
| moveLegacyState($context) | Move what an earlier version kept in shared/ where it now belongs, and delete the tarballs it kept there. | |
| plan($context) | ||
| planProvision($context) | ||
| provision($context) | Write the templates and run the postInstall where they belong, when they have to -- then stamp the target with what ran, so the next run can tell. | |
| provisions() | ||
| readStamp($context) | ||
| render($context) | ||
| verify($context) | ||
| __construct($templates, $postInstall, $sharedMode) |
Constants2
LEGACY
what an earlier version kept in shared/, relative to it: its own state, and the tarballs. moveLegacyState
STAMP
The stamp, in the target's deploy/, of the templates and the command that last ran to the end on the target: a sha256 of what they wrote and ran, placeholders resolved.
Properties3
postInstall
sharedMode
templates
- Type
- array
Methods20
apply($context)
InstallTask.php:107getDescription()
InstallTask.php:58| returns | string |
getExclusion($context)
InstallTask.php:257getLegacyState($context)
InstallTask.php:149getStamp($context, $files)
InstallTask.php:338getStampFilename($context)
InstallTask.php:348isNeeded($context)
InstallTask.php:64Nothing to do once the layout is in place, the web root linked and the templates unchanged since they last ran -- which is the normal case on every deploy but the first.
isProvisionNeeded($context)
InstallTask.php:265isRealFolder($context, $path)
InstallTask.php:208isWebRootLinked($context)
InstallTask.php:200linkWebRoot($context)
InstallTask.php:227Make the path the host serves resolve to the live release.
moveLegacyState($context)
InstallTask.php:165Move what an earlier version kept in shared/ where it now belongs, and delete the tarballs it kept there.
plan($context)
InstallTask.php:73planProvision($context)
InstallTask.php:271provision($context)
InstallTask.php:299Write the templates and run the postInstall where they belong, when they have to -- then stamp the target with what ran, so the next run can tell. STAMP
provisions()
InstallTask.php:251| returns | bool | whether there are templates to write or a command to run at all. |
readStamp($context)
InstallTask.php:343render($context)
InstallTask.php:322verify($context)
InstallTask.php:122__construct($templates, $postInstall, $sharedMode)
InstallTask.php:49Inherited members (38)
| Constants | Declared by | Description | |
|---|---|---|---|
ALERT | iLogLevel | Alert: Action must be taken immediately. | |
ALL | iLogLevel | Mask for all | |
ALL_PLUS | iLogLevel | debug everything | |
BACKTRACE | iLogLevel | ||
CRITICAL | iLogLevel | Critical: Critical conditions. | |
DEBUG | iLogLevel | Debug: Detailed debug information. | |
DEEP | iLogLevel | debug everything with arguments | |
EMERGENCY | iLogLevel | Emergency: System is unusable. | |
ERROR | iLogLevel | Error: Runtime errors that do not require immediate action but should typically be logged and monitored. | |
ERROR_PLUS | iLogLevel | Mask for all error | |
FATAL | iLogLevel | Mask for all fatal error | |
INFO | iLogLevel | Info: Interesting events. | |
INFO_PLUS | iLogLevel | Mask for all errors/warning/notices/info | |
MEMORY | iLogLevel | include backtrace object | |
NOTICE | iLogLevel | Notice: Normal but significant events. | |
NOTICE_PLUS | iLogLevel | Mask for all errors/warning/notices/info | |
TRACE | iLogLevel | include backtrace as origins | |
WARNING | iLogLevel | Warning: Exceptional occurrences that are not errors. | |
WARNING_PLUS | iLogLevel | Mask for all errors and warnings |
| Properties | Declared by | Description | |
|---|---|---|---|
verbosity | aDeployTask |
| Methods | Declared by | Description | |
|---|---|---|---|
alert($message, $context) | aDeployTask | Action must be taken immediately. | |
backtraces($message, $context) | aDeployTask | Force-log a message at INFO level together with a full stack trace/memory snapshot (iLogLevel::BACKTRACE), bypassing the verbosity mask entirely (any non-zero verbosity is enough to trigger it). | |
critical($message, $context) | aDeployTask | Critical conditions. No-op if CRITICAL is currently filtered out by the verbosity mask. | |
debug($message, $context) | aDeployTask | Detailed debug information. | |
debugName() | aDeployTask | ||
emergency($message, $context) | aDeployTask | System is unusable. No-op if EMERGENCY is currently filtered out by the verbosity mask. | |
error($message, $context) | aDeployTask | Runtime errors that do not require immediate action but should typically be logged and monitored. | |
getName() | aDeployTask | ||
getVerbosity() | aDeployTask | ||
info($message, $context) | aDeployTask | Interesting events. No-op if INFO is currently filtered out by the verbosity mask. | |
isChange() | aDeployTask | Whether running this task CHANGES anything. | |
isRollbackCritical() | aDeployTask | ||
log($level, $message, $context) | aDeployTask | Logs with an arbitrary level. | |
notice($message, $context) | aDeployTask | Normal but significant events. | |
rollback($context) | aDeployTask | Undo this task. Called by the runner, in reverse order, for every task already applied when a later one failed. | |
setVerbosity($verb) | aDeployTask | Set the current verbosity mask, replacing whatever it was before. | |
testVerbosity($level) | aDeployTask | Test whether a given level (or set of levels) is currently enabled by this instance's verbosity mask. | |
warning($message, $context) | aDeployTask | Exceptional occurrences that are not errors. |