Copy Hook
The optional copy entry contains a PHP file relative to own package root,
starting with a leading forward slash, such as:
{
"lifecycle": {
"copy": "/lifecycle/copy.php"
}
}
The content of the file is a custom on-copy callback script that is executed by the stack task after the entire new state has been stacked in the state directory and the associated package has been recycled by copying it from the currently existing internal state.
The script may have debug serializer output, such as:
echo "debug log message";
The script may trigger a default PHP error, warning, or notice, such as:
trigger_error("message", E_USER_ERROR);
After successful execution, the script returns the boolean indicator true if
something is done or false if nothing is done, such as:
return true;
Download Hook
The optional download entry contains a PHP file relative to own package root,
starting with a leading forward slash, such as:
{
"lifecycle": {
"download": "/lifecycle/download.php"
}
}
The content of the file is a custom on-download callback script that is executed by the stack task after the entire new state has been stacked in the state directory and the associated package has been downloaded from a remote source.
The script may have debug serializer output, such as:
echo "debug log message";
The script may trigger a default PHP error, warning, or notice, such as:
trigger_error("message", E_USER_ERROR);
After successful execution, the script returns the boolean indicator true if
something is done or false if nothing is done, such as:
return true;
Install Hook
The optional install entry contains a PHP file relative to own package root,
starting with a leading forward slash, such as:
{
"lifecycle": {
"install": "/lifecycle/install.php"
}
}
The content of the file is a custom on-install callback script that is executed by the shift task after the entire new state has been moved from the state directory to the current working directory and the associated package has been downloaded from a remote source.
The script may have debug serializer output, such as:
echo "debug log message";
The script may trigger a default PHP error, warning, or notice, such as:
trigger_error("message", E_USER_ERROR);
After successful execution, the script returns the boolean indicator true if
something is done or false if nothing is done, such as:
return true;
Update Hook
The optional update entry contains a PHP file relative to own package root,
starting with a leading forward slash, such as:
{
"lifecycle": {
"update": "/lifecycle/update.php"
}
}
The content of the file is a custom on-update callback script that is executed by the shift task after the entire new state has been moved from the state directory to the current working directory and the associated package has been recycled by copying it from the previous existing internal state.
The script may have debug serializer output, such as:
echo "debug log message";
The script may trigger a default PHP error, warning, or notice, such as:
trigger_error("message", E_USER_ERROR);
After successful execution, the script returns the boolean indicator true if
something is done or false if nothing is done, such as:
return true;
Delete Hook
The optional delete entry contains a PHP file relative to own package root,
starting with a leading forward slash, such as:
{
"lifecycle": {
"delete": "/lifecycle/delete.php"
}
}
The content of the file is a custom on-delete callback script that is executed by the shift task during cleanup before the entire new state is moved from the state directory to the current working directory and the associated package is obsolete.
The script may have debug serializer output, such as:
echo "debug log message";
The script may trigger a default PHP error, warning, or notice, such as:
trigger_error("message", E_USER_ERROR);
After successful execution, the script returns the boolean indicator true if
something is done or false if nothing is done, such as:
return true;