PEAR
[ class tree: PEAR ] [ index: PEAR ] [ all elements ]

Class: PEAR_Task_Postinstallscript

Source Location: /PEAR-1.10.12/PEAR/Task/Postinstallscript.php

Class Overview

PEAR_Task_Common
   |
   --PEAR_Task_Postinstallscript

Implements the postinstallscript file task.


Author(s):

Version:

  • Release: 1.10.12

Copyright:

  • 1997-2009 The Authors

Variables

Methods


Child classes:

PEAR_Task_Postinstallscript_rw
Abstracts the postinstallscript file task xml.

Inherited Variables

Inherited Methods

Class: PEAR_Task_Common

PEAR_Task_Common::__construct()
PEAR_Task_Common::hasPostinstallTasks()
PEAR_Task_Common::init()
Initialize a task instance with the parameters
PEAR_Task_Common::isScript()
Determines whether a role is a script
PEAR_Task_Common::run()
This method is used to process each of the tasks for a particular multiple class type. Simple tasks need not implement this method.
PEAR_Task_Common::runPostinstallTasks()
PEAR_Task_Common::startSession()
Begin a task processing session. All multiple tasks will be processed
PEAR_Task_Common::throwError()
PEAR_Task_Common::validateXml()
Validate the basic contents of a task tag.

Class Details

[line 34]
Implements the postinstallscript file task.

Note that post-install scripts are handled separately from installation, by the "pear run-scripts" command



[ Top ]


Class Variables

$phase =  PEAR_TASK_INSTALL

[line 46]

  • Access: public

Type:   mixed
Overrides:   Array


[ Top ]

$type =  'script'

[line 36]

  • Access: public

Type:   mixed
Overrides:   Array


[ Top ]

$_class =

[line 37]

  • Access: public

Type:   mixed


[ Top ]

$_contents =

[line 45]

  • Access: public

Type:   mixed


[ Top ]

$_obj =

[line 39]

  • Access: public

Type:   mixed


[ Top ]

$_params =

[line 38]

  • Access: public

Type:   mixed


[ Top ]

$_pkg =

[line 44]

  • Access: public



[ Top ]



Method Detail

init   [line 248]

void init( array $xml, array $fileattribs, string|null $lastversion)

Initialize a task instance with the parameters
  • Access: public

Overrides PEAR_Task_Common::init() (Initialize a task instance with the parameters)

Parameters:

array   $xml   —  raw, parsed xml
array   $fileattribs   —  attributes from the <file> tag containing this task
string|null   $lastversion   —  last installed version of this package, if any (useful for upgrades)

[ Top ]

run   [line 347]

void run( array $tasks, string 1)

No longer used

Overrides PEAR_Task_Common::run() (This method is used to process each of the tasks for a particular multiple class type. Simple tasks need not implement this method.)

Parameters:

string   1   —  install or upgrade
array   $tasks   —  an array of tasks

[ Top ]

startSession   [line 300]

bool|PEAR_Error startSession( mixed $pkg, string $contents, string $dest)

Unlike other tasks, the installed file name is passed in instead of the file contents, because this task is handled post-installation
  • Return: false to skip this file, PEAR_Error to fail (use $this->throwError)
  • Access: public

Overrides PEAR_Task_Common::startSession() (Begin a task processing session. All multiple tasks will be processed)

Parameters:

mixed   $pkg   —  PEAR_PackageFile_v1|PEAR_PackageFile_v2
string   $contents   —  file name
string   $dest   —  the eventual final file location (informational only)

[ Top ]

validateXml   [line 59]

void validateXml( PEAR_PackageFile_v2 $pkg, array $xml, PEAR_Config $config, array $fileXml)

Validate the raw xml at parsing-time.

This also attempts to validate the script to make sure it meets the criteria for a post-install script

  • Access: public

Overrides PEAR_Task_Common::validateXml() (Validate the basic contents of a task tag.)

Parameters:

PEAR_PackageFile_v2   $pkg   — 
array   $xml   —  The XML contents of the <postinstallscript> tag
PEAR_Config   $config   — 
array   $fileXml   —  the entire parsed <file> tag

[ Top ]

_stripNamespace   [line 262]

void _stripNamespace( [ $params = null])

Strip the tasks: namespace from internal params
  • Access: public

Parameters:

   $params   — 

[ Top ]


Documentation generated on Sun, 19 Apr 2020 14:22:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.