cvs: pear /HTML_Progress/tutorials/HTML_Progress A_install.pkg B_migration12.pkg
| From: | Laurent Laville | Date: | Sat, 11 Sep 2004 15:39:55 +0000 |
| Subject: | cvs: pear /HTML_Progress/tutorials/HTML_Progress A_install.pkg B_migration12.pkg | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-23836@lists.php.net to get a copy of this message | ||
farell Sat Sep 11 11:39:55 2004 EDT
Added files:
/pear/HTML_Progress/tutorials/HTML_Progress A_install.pkg
B_migration12.pkg
Log:
appendixes A (install) and B (migration)
http://cvs.php.net/co.php/pear/HTML_Progress/tutorials/HTML_Progress/A_install.pkg?r=1.1&p=1
Index: pear/HTML_Progress/tutorials/HTML_Progress/A_install.pkg
+++ pear/HTML_Progress/tutorials/HTML_Progress/A_install.pkg
<!-- $Revision: 1.1 $ -->
<refentry id="{@id}">
<refnamediv>
<refname>Appendix A. Installation</refname>
<refpurpose>how to obtain and install HTML_Progress</refpurpose>
</refnamediv>
<refsect1 id="{@id obtain}">
<title>How to obtain HTML_Progress</title>
<para>
You can download the latest version of HTML_Progress from its PEAR homepage
{@link http://pear.php.net/package/HTML_Progress/}.
</para>
</refsect1>
<refsect1 id="{@id install}">
<title>Installing</title>
<orderedlist>
<listitem><para>Setup the PEAR package manager (if you haven't got it already)
-
see <emphasis>Getting the manager</emphasis>
at {@link http://pear.php.net/manual/en/installation.getting.php}
(command line version) -
or <emphasis>Getting Up and Running with the PEAR Web Installer</emphasis>
at {@link http://www.phpkitchen.com/article.php?story=20021201062516970}
(web package manager).
</para>
</listitem>
<listitem><para>Type <emphasis>pear install HTML_Progress</emphasis>
(using the command line manager)</para></listitem>
<listitem><para>PEAR::HTML_Progress is now installed</para></listitem>
</orderedlist>
</refsect1>
<refsect1 id="{@id requirements}">
<title>Requirements</title>
<para>
In order to successfully use all features of HTML_Progress, you need also
some others PEAR packages :
<para>
<itemizedlist>
<listitem>{@link http://pear.php.net/package/HTML_Common/
HTML_Common 1.2} or greater,
is mandatory.
</listitem>
<listitem>{@link http://pear.php.net/package/PEAR PEAR 1.3.1} or greater,
is used only by the default error handler system to raise a PEAR_Error object.
</listitem>
<listitem>{@link http://pear.php.net/package/HTML_QuickForm
HTML_QuickForm 3.1.1} or greater,
is used by <classname>HTML_Progress_Monitor</classname>
and <classname>HTML_Progress_Generator</classname> classes.
</listitem>
<listitem>{@link http://pear.php.net/package/HTML_QuickForm_Controller
HTML_QuickForm_Controller 0.9.3} or greater,
is used only by the <classname>HTML_Progress_Generator</classname> class.
</listitem>
<listitem>{@link http://pear.php.net/package/HTML_CSS HTML_CSS
0.3.4} or greater,
is used by <classname>HTML_Progress</classname> class to generate default
stylesheet.
</listitem>
<listitem>{@link http://pear.php.net/package/HTML_Page HTML_Page
2.0.0RC2} or greater,
is used only by the <classname>HTML_Progress_Generator</classname> class.
</listitem>
<listitem>{@link http://pear.php.net/package/Config Config 1.9} or
greater,
is used only by the {@tutorial progress.setmodel.pkg HTML_Progress::setModel} method.
</listitem>
<listitem>{@link http://pear.php.net/package/PHPUnit PHPUnit 0.6.2} or
greater,
is used only to run regression tests.
</listitem>
<listitem>{@link http://pear.php.net/package/Image_Color
Image_Color 1.0.0} or greater,
and PHP extension GD 2.0.1 or greater,
are used only to produce circle or ellipse progress shape.
</listitem>
</itemizedlist>
</para>
</para>
</refsect1>
</refentry>
http://cvs.php.net/co.php/pear/HTML_Progress/tutorials/HTML_Progress/B_migration12.pkg?r=1.1&p=1
Index: pear/HTML_Progress/tutorials/HTML_Progress/B_migration12.pkg
+++ pear/HTML_Progress/tutorials/HTML_Progress/B_migration12.pkg
<!-- $Revision: 1.1 $ -->
<refentry id="{@id}">
<refnamediv>
<refname>Appendix B. Migration to version 1.2</refname>
<refpurpose>API changes to observe</refpurpose>
</refnamediv>
<refsect1 id="{@id why-changes}">
<title>Why these changes ?</title>
<para>
HTML_Progress has improved a lot since version 1.1. New features and easy short links comes,
but also some functionalities was removed.
<simpara>
With release 1.2 <classname>HTML_Progress_Model</classname> class was removed,
making
HTML_Progress package much lighter. But don't worry, the feature still exists:
see {@tutorial progress.setmodel.pkg HTML_Progress::setModel} method.
</simpara>
</para>
</refsect1>
<refsect1 id="{@id adjust-code}">
<title>How to adjust your code</title>
<refsect2 id="{@id progress-display}">
<title>HTML_Progress::display()</title>
<para>
<simpara>
When you coded a loop such as:
<example>
<programlisting role="php">
<![CDATA[
<?php
require_once 'HTML/Progress.php';
$bar = new HTML_Progress();
// ...
do {
$bar->display();
if ($bar->getPercentComplete() == 1) {
$break;
}
$bar->incValue();
} while(1)
?>
]]>
</programlisting>
</example>
the sleep action in version 1.1 (an empty for-loop) was included inside
<emphasis>HTML_Progress::display</emphasis> method.
Now in version 1.2 a new API comes: {@tutorial progress.sleep.pkg HTML_Progress::sleep}
which used in most case the PHP function {@link http://www.php.net/manual/en/function.usleep.php},
rather than an empty for-loop. You should include this new method in your do-while loop,
as in implementation below:
</simpara>
<simpara>
<example>
<programlisting role="php">
<![CDATA[
<?php
require_once 'HTML/Progress.php';
$bar = new HTML_Progress();
// ...
do {
$bar->display();
if ($bar->getPercentComplete() == 1) {
$break;
}
$bar->sleep();
$bar->incValue();
} while(1)
?>
]]>
</programlisting>
</example>
</simpara>
<para>
<tip>
Of course, you need the HTML_Progress::sleep method only to produce demonstration. In real
world the user task should at least enough long to delay and smooth progress meter animation.
</tip>
</para>
</para>
</refsect2>
<refsect2 id="{@id progress-run}">
<title>HTML_Progress::run()</title>
<para>
This new API allows to replace a do-while loop as in above example.
Its also allows to call a user-callback defined by {@tutorial progress.setprogresshandler.pkg}
and manage both progress meter mode (determinate and indetermiante).
</para>
</refsect2>
<refsect2 id="{@id progress-run}">
<title>HTML_Progress::hasErrors(), HTML_Progress::getError()</title>
<para>
These new API allows to catch HTML_Progress internal errors more easily.
See {@tutorial part2-errorhandling.pkg} for details.
</para>
</refsect2>
</refsect1>
</refentry>