![]() |
Bearsampp 2026.9.23
|
Public Member Functions | |
| __construct (&$config, &$logger, $phase) | |
| init ($xml, $fileAttributes, $lastVersion) | |
| isScript () | |
| startSession ($pkg, $contents, $dest) | |
| throwError ($msg, $code=-1) | |
Static Public Member Functions | |
| static | hasPostinstallTasks () |
| static | run ($tasks) |
| static | runPostinstallTasks () |
| static | validateXml ($pkg, $xml, $config, $fileXml) |
Data Fields | |
| $logger | |
| $phase = PEAR_TASK_INSTALL | |
Protected Attributes | |
| $config | |
| $installphase | |
| $registry | |
| $type = 'simple' | |
Definition at line 55 of file Common.php.
| __construct | ( | & | $config, |
| & | $logger, | ||
| $phase ) |
|
static |
@final
Definition at line 170 of file Common.php.
References $GLOBALS.
Referenced by PEAR_Installer\install().
| init | ( | $xml, | |
| $fileAttributes, | |||
| $lastVersion ) |
Initialize a task instance with the parameters
| array | raw, parsed xml |
| array | attributes from the <file> tag containing this task |
| string|null | last installed version of this package @abstract |
Reimplemented in PEAR_Task_Postinstallscript, PEAR_Task_Replace, PEAR_Task_Unixeol, and PEAR_Task_Windowseol.
Definition at line 133 of file Common.php.
| isScript | ( | ) |
Determines whether a role is a script
Definition at line 196 of file Common.php.
|
static |
This method is used to process each of the tasks for a particular multiple class type. Simple tasks need not implement this method.
| array | an array of tasks @access protected |
Reimplemented in PEAR_Task_Postinstallscript.
Definition at line 163 of file Common.php.
|
static |
@final
Definition at line 178 of file Common.php.
References $GLOBALS, and throwError().
Referenced by PEAR_Installer\install().
| startSession | ( | $pkg, | |
| $contents, | |||
| $dest ) |
Begin a task processing session. All multiple tasks will be processed after each file has been successfully installed, all simple tasks should perform their task here and return any errors using the custom throwError() method to allow forward compatibility
This method MUST NOT write out any changes to disk
| PEAR_PackageFile_v2 | |
| string | file contents |
| string | the eventual final file location (informational only) |
Reimplemented in PEAR_Task_Postinstallscript, PEAR_Task_Replace, PEAR_Task_Unixeol, and PEAR_Task_Windowseol.
Definition at line 152 of file Common.php.
| throwError | ( | $msg, | |
| $code = -1 ) |
Definition at line 201 of file Common.php.
Referenced by runPostinstallTasks(), and PEAR_Task_Postinstallscript\startSession().
|
static |
Validate the basic contents of a task tag.
| PEAR_PackageFile_v2 | |
| array | |
| PEAR_Config | |
| array | the entire parsed <file> tag |
For PEAR_TASK_ERROR_MISSING_ATTRIB, pass the attribute name in For PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, pass the attribute name and an array of legal values in
@abstract
Reimplemented in PEAR_Task_Postinstallscript, PEAR_Task_Replace, PEAR_Task_Unixeol, and PEAR_Task_Windowseol.
Definition at line 121 of file Common.php.
References $config.
|
protected |
@access protected
Definition at line 76 of file Common.php.
Referenced by __construct(), PEAR_Task_Postinstallscript_rw\__construct(), PEAR_Task_Replace_rw\__construct(), PEAR_Task_Unixeol_rw\__construct(), PEAR_Task_Windowseol_rw\__construct(), validateXml(), PEAR_Task_Postinstallscript\validateXml(), PEAR_Task_Replace\validateXml(), PEAR_Task_Unixeol\validateXml(), and PEAR_Task_Windowseol\validateXml().
|
protected |
@access protected
Definition at line 88 of file Common.php.
| $logger |
@access protected
Definition at line 84 of file Common.php.
Referenced by __construct(), PEAR_Task_Postinstallscript_rw\__construct(), PEAR_Task_Replace_rw\__construct(), PEAR_Task_Unixeol_rw\__construct(), and PEAR_Task_Windowseol_rw\__construct().
| $phase = PEAR_TASK_INSTALL |
Determines which install phase this task is executed under
Definition at line 72 of file Common.php.
Referenced by __construct().
|
protected |
@access protected
Definition at line 80 of file Common.php.
|
protected |
Valid types for this version are 'simple' and 'multiple'
Child task classes must override this property.
@access protected
Definition at line 68 of file Common.php.