Post-installation Scripts (Previous) (Next) Composants du noyau

View this page in Last updated: Sun, 07 Sep 2008
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

Structure of a post-install script

The post-install script class must contain two methods, one named init(), and the other named run(). The init() method is called at the same time as all other post-install scripts. The run() method is called at the conclusion of each parameter group in order to process the user's responses to queries.

The init() method

PEAR_Config $xml

The current configuration used for installation.

PEAR_PackageFile_v2 $self

The package.xml contents as abstracted by this object.

chaîne de caractères|NULL $lastInstalledVersion

The last version of this package that was installed. This is a very important parameter, as it is the only way to determine whether a package is being installed from scratch, or upgraded from a previous version. Using this parameter, it is possible to determine what incremental changes, if any, need to be performed.

Post-installation Scripts (Previous) (Next) Composants du noyau

Download Documentation Last updated: Sun, 07 Sep 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.