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

Class: PEAR_Task_Postinstallscript

Source Location: /PEAR-1.10.0dev2/PEAR/Task/Postinstallscript.php

Class Overview

PEAR_Task_Common
   |
   --PEAR_Task_Postinstallscript

Implements the postinstallscript file task.


Author(s):

Version:

  • Release: 1.10.0dev2

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 346]

void run( array 0, 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:

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

[ Top ]

startSession   [line 299]

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

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

[ 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 Fri, 31 Jul 2015 09:30:24 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.