本文整理汇总了PHP中FannieDispatch类的典型用法代码示例。如果您正苦于以下问题:PHP FannieDispatch类的具体用法?PHP FannieDispatch怎么用?PHP FannieDispatch使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FannieDispatch类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: str_replace
$sales->lastYearTransactions($avg_trans);
} else {
$sales->lastYearTransactions(0);
}
/**
Sales last year, pro-rated
*/
$twoQ = str_replace('__table__', $dlog2, $salesQ);
$twoP = $dbc->prepare($twoQ);
$twoR = $dbc->execute($twoP, $args);
while ($row = $dbc->fetch_row($twoR)) {
$sales->obfCategoryID($row['id']);
$sales->superID($row['superID']);
$avg_sales = $row['sales'] / $num_days * 7;
$sales->lastYearSales($avg_sales);
if ($future) {
$sales->actualSales(0);
$labor = $class_lib::getLabor($dbc);
$labor->obfWeekID($week->obfWeekID());
$labor->obfCategoryID($row['id']);
foreach ($labor->find() as $l) {
$sales->growthTarget($l->growthTarget());
}
}
$sales->save();
}
}
}
}
FannieDispatch::conditionalExec();
开发者ID:phpsmith,项目名称:IS4C,代码行数:30,代码来源:ObfWeeklyReport.php
示例2: form_content
$this->stats['done']++;
}
}
return $ret;
}
function form_content()
{
return '<div class="well"><legend>Instructions</legend>
Upload a CSV or XLS file containing likecode #s and prices. Cost
may also optionally be included.
<br />A preview helps you to choose and map columns to the database.
<br />The uploaded file will be deleted after the load.
</div><br />';
}
function results_content()
{
\COREPOS\Fannie\API\data\SyncLanes::pushTable('products');
$ret = '<p>Import Complete</p>';
$ret .= '<div class="alert alert-success">Updated ' . $this->stats['done'] . ' likecodes</div>';
if (count($this->stats['error']) > 0) {
$ret .= '<div class="alert alert-danger"><ul>';
foreach ($this->stats['error'] as $error) {
$ret .= '<li>' . $error . '</li>';
}
$ret .= '</ul></div>';
}
return $ret;
}
}
FannieDispatch::conditionalExec(false);
开发者ID:phpsmith,项目名称:IS4C,代码行数:30,代码来源:LikeCodePriceUploadPage.php
示例3: explode
{
$parts = explode('=', $opt, 2);
return $parts[1];
}
}
if (php_sapi_name() === 'cli' && basename($_SERVER['PHP_SELF']) == basename(__FILE__)) {
if ($argc < 2) {
echo "Usage: php FannieTask.php <Task Class Name>\n";
return 1;
}
include dirname(__FILE__) . '/../config.php';
include dirname(__FILE__) . '/FannieAPI.php';
$config = FannieConfig::factory();
$logger = new FannieLogger();
FannieDispatch::setLogger($logger);
FannieDispatch::setErrorHandlers();
// prepopulate autoloader
$preload = FannieAPI::listModules('FannieTask');
$class = $argv[1];
if (!class_exists($class)) {
echo "Error: class '{$class}' does not exist\n";
return 1;
}
$obj = new $class();
if (!is_a($obj, 'FannieTask')) {
echo "Error: invalid class. Must be subclass of FannieTask\n";
return 1;
}
if (is_numeric($config->get('TASK_THRESHOLD'))) {
$obj->setThreshold($config->get('TASK_THRESHOLD'));
}
开发者ID:phpsmith,项目名称:IS4C,代码行数:31,代码来源:FannieTask.php
示例4: setLogger
public static function setLogger($l)
{
self::$logger = $l;
}
开发者ID:phpsmith,项目名称:IS4C,代码行数:4,代码来源:FannieDispatch.php
注:本文中的FannieDispatch类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论