当前位置: 首页>>代码示例>>PHP>>正文


PHP HTML_Progress::setProgressHandler方法代码示例

本文整理汇总了PHP中HTML_Progress::setProgressHandler方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_Progress::setProgressHandler方法的具体用法?PHP HTML_Progress::setProgressHandler怎么用?PHP HTML_Progress::setProgressHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTML_Progress的用法示例。


在下文中一共展示了HTML_Progress::setProgressHandler方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: strstr

    $fileInfo = get_latestFile($paperInfo->PaperID, &$err_message);
    $paperSize = $fileInfo->FileSize;
    $totalPaperSize += $paperSize;
    //Last element of $paperNotZippedArr is a comma and is not looped.
    for ($i = 0; $i < count($paperNotZippedArr) - 1; $i++) {
        if ($paperNotZippedArr[$i] == $paperInfo->PaperID) {
            //echo $paperInfo -> PaperID;
            $fileEnding = strstr($fileInfo->FileName, '.');
            $data = $fileInfo->File;
            $name = $paperInfo->PaperID . $fileEnding;
            $tarFile->AddString("papers/" . $name, $data);
        }
    }
}
// Tell progress bar to archive a paper for each 'tick'
$bar->setProgressHandler('archive_next_paper');
// Start building head info
ob_start();
?>

<style type="text/css">
<?php 
echo $bar->getStyle();
?>
</style>
<script type="text/javascript">
<?php 
echo $bar->getScript();
?>
</script>
开发者ID:alexzita,项目名称:alex_blog,代码行数:30,代码来源:process_build_cd_structure.php

示例2: myMethodHandler

{
    function myMethodHandler($progressValue, &$bar)
    {
        if (fmod($progressValue, 10) == 0) {
            echo "myMethodHandler -> progress value is = {$progressValue} <br/>\n";
        }
        $bar->sleep();
    }
}
$obs = new myClassHandler();
$monitor = new HTML_Progress_Monitor('frmMonitor3', array('button' => array('style' => 'width:80px;')));
$progress = new HTML_Progress();
$progress->setUI('Progress_Default2');
// Attach a progress ui-model
$progress->setAnimSpeed(20);
$progress->setProgressHandler(array(&$obs, 'myMethodHandler'));
$monitor->setProgressElement($progress);
?>
<html>
<head>
<title>ProgressBar Monitor - Default renderer </title>
<style type="text/css">
<!--
.progressStatus {
    color:#000000;
    font-size:10px;
}
<?php 
echo $monitor->getStyle();
?>
// -->
开发者ID:Ogwang,项目名称:sainp,代码行数:31,代码来源:method_callback.php

示例3: floor

    $i = floor($progressValue / 10);
    if ($progressValue == 100) {
        $msg = '';
    } else {
        $msg = "&nbsp; installing package ({$progressValue} %) ... : " . $pkg[$i];
    }
    $obj->setString($msg);
}
$bar = new HTML_Progress();
$bar->setAnimSpeed(100);
$bar->setIncrement(5);
$bar->setStringPainted(true);
// get space for the string
$bar->setString('');
// but don't paint it
$bar->setProgressHandler('myFunctionHandler');
$ui =& $bar->getUI();
$ui->setTab('    ');
$ui->setStringAttributes('width=350 align=left');
?>
<html>
<head>
<title>Horizontal String ProgressBar example</title>
<style type="text/css">
<!--
<?php 
echo $bar->getStyle();
?>

body {
    background-color: #FFFFFF;
开发者ID:Ogwang,项目名称:sainp,代码行数:31,代码来源:string.php

示例4:

    }
}
$progress = new HTML_Progress();
$ui =& $progress->getUI();
$ui->setProgressAttributes(array('background-color' => '#e0e0e0'));
$ui->setStringAttributes(array('color' => '#996', 'background-color' => '#CCCC99'));
$ui->setCellAttributes(array('active-color' => '#996'));
$progress->setAnimSpeed(200);
$progress->setIncrement(10);
$progress->setStringPainted(true);
// get space for the string
$progress->setString("");
// but don't paint it
$progress->setIndeterminate(true);
// Progress start in indeterminate mode
$progress->setProgressHandler('myProgressHandler');
?>
<html>
<head>
<title>Basic Indeterminate Mode Progress example</title>
<style type="text/css">
<!--
body {
    background-color: #CCCC99;
    color: #996;
    font-family: Verdana, Arial;
}

a:visited, a:active, a:link {
    color: yellow;
}
开发者ID:Ogwang,项目名称:sainp,代码行数:31,代码来源:half_basic.php


注:本文中的HTML_Progress::setProgressHandler方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。