PHP Manual

PEAR Manual

Smarty Manual

PostgreSQL

MySQL Manual

Perl Manual

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.

string|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.