Source for file preview.php
Documentation is available at preview.php
// +----------------------------------------------------------------------+
// | PEAR :: HTML :: Progress |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Author: Laurent Laville <pear@laurent-laville.org> |
// +----------------------------------------------------------------------+
// $Id: preview.php,v 1.4 2004/07/05 22:04:15 farell Exp $
* The ActionPreview class provides a live demonstration
* of the progress bar built by HTML_Progress_Generator.
* @author Laurent Laville <pear@laurent-laville.org>
* @subpackage Progress_UI
* @license http://www.php.net/license/3_0.txt PHP License 3.0
function perform(&$page, $actionName)
$page->isFormBuilt () or $page->buildForm ();
$page->handle ('display');
$strings = $page->controller ->exportValue ('page4','strings');
$bar = $page->controller ->createProgressBar ();
$percent = $bar->getPercentComplete ();
if ($bar->isStringPainted ()) {
if (substr($strings, -1 ) == ";") {
for ($i=0; $i< count($str)-1; $i++ ) {
list ($p, $s) = explode(",", $str[$i]);
$bar->setString (trim($s));
break; // the progress bar has reached 100%
Documentation generated on Mon, 11 Mar 2019 13:52:38 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|