cvs: peardoc /en/guide/migrating postinstall.xml

From: Date: Mon, 30 May 2005 21:07:46 +0000
Subject: cvs: peardoc /en/guide/migrating postinstall.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-6127@lists.php.net to get a copy of this message
cellog Mon May 30 17:07:46 2005 EDT Modified files: /peardoc/en/guide/migrating postinstall.xml Log: more post-install script docs, almost done with this. http://cvs.php.net/diff.php/peardoc/en/guide/migrating/postinstall.xml?r1=1.2&r2=1.3&ty=u Index: peardoc/en/guide/migrating/postinstall.xml diff -u peardoc/en/guide/migrating/postinstall.xml:1.2 peardoc/en/guide/migrating/postinstall.xml:1.3 --- peardoc/en/guide/migrating/postinstall.xml:1.2 Mon May 30 00:32:23 2005 +++ peardoc/en/guide/migrating/postinstall.xml Mon May 30 17:07:46 2005 @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <chapter id="guide.migrating.postinstall"> <chapterinfo> <author> <firstname>Gregory</firstname> <surname>Beaver</surname> </author> - <date>$Date: 2005/05/30 04:32:23 $</date> + <date>$Date: 2005/05/30 21:07:46 $</date> </chapterinfo> <title>Post-installation Scripts</title> @@ -50,10 +50,101 @@ to queries. </para> - <sect2> + <sect2 id="guide.migrating.postinstall.structure.init"> + <title>The <function>init</function> method</title> + <para> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>init</function></funcdef> + <paramdef>PEAR_Config <parameter>$config</parameter></paramdef> + <paramdef>PEAR_PackageFile_v2 <parameter>$self</parameter></paramdef> + <paramdef>string|null <parameter>$lastInstalledVersion</parameter></paramdef> + </funcprototype> + </funcsynopsis> + </para> + <para> + <variablelist> + <varlistentry> + <term> + <link linkend="core.ppm.pear-config">PEAR_Config</link> <parameter>$xml</parameter> + </term> + <listitem> + <para> + The current configuration used for installation. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + PEAR_PackageFile_v2 <parameter>$self</parameter> + </term> + <listitem> + <para> + The package.xml contents as abstracted by this object. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + &type.string;|&null; <parameter>$lastInstalledVersion</parameter> + </term> + <listitem> + <para> + 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. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </sect2> + + <sect2 id="guide.migrating.postinstall.structure.run"> <title>The <function>run</function> method</title> <para> - Unfinished documentation + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>run</function></funcdef> + <paramdef>array <parameter>$infoArray</parameter></paramdef> + <paramdef>string <parameter>$paramGroupId</parameter></paramdef> + </funcprototype> + </funcsynopsis> + </para> + <para> + <variablelist> + <varlistentry> + <term> + &type.array; <parameter>$infoArray</parameter> + </term> + <listitem> + <para> + if <varname>$paramGroupId</varname> is <literal>_undoOnError</literal>, then + $infoArray will contain a list of successfully completed parameter group + sections. This can be used to restore any system changes made by the installation + script. + </para> + <para> + Otherwise, <varname>$infoArray</varname> contains the results of the user input + from the most recent &lt;paramgroup&gt; section. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + &type.string; <parameter>$paramGroupId</parameter> + </term> + <listitem> + <para> + This variable either contains <literal>_undoOnError</literal> or the contents + of the most recent &lt;paramgroup&gt;'s &lt;id&gt; tag. Note that paramgroup + id cannot begin with an underscore (<literal>_</literal>), and so + <literal>_undoOnError</literal> can only be triggered by the PEAR installer. + </para> + </listitem> + </varlistentry> + </variablelist> </para> </sect2> </sect1>

« previous php.pear.doc (#6127) next »