本文整理汇总了PHP中Price::show方法的典型用法代码示例。如果您正苦于以下问题:PHP Price::show方法的具体用法?PHP Price::show怎么用?PHP Price::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Price
的用法示例。
在下文中一共展示了Price::show方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: shipping
/**
* The function updates shipping in Cart.
*
* @access public
* @return string The JSON response.
*/
public function shipping()
{
$Cart = Cart::getCart();
$Shipping = new Shipping();
$Shipping = $Shipping->findItem(array('Id = ' . Request::get('id')));
$Cart->setShipping($Shipping);
$Cart->save();
$response['grand'] = Price::show($Cart->getGrandTotal());
$response['result'] = 1;
return $this->outputJSON($response);
}
示例2: count
if ($i == 'a') {
break;
}
Console::left(count(${$i}), 4);
Console::left(File::getFilesize($stats['size'][$i], 'b,K,M,G'), 5);
Console::left($stats['lines'][$i] . 'L', 8);
Console::write('| ');
}
Console::left(count($m) + count($c) + count($v), 4);
Console::left(File::getFilesize($stats['size']['a'], 'b,K,M,G'), 5);
Console::left($stats['lines']['a'] . 'L', 8);
Console::writeln('|');
Console::write('\\');
Console::write(str_repeat('=', 98));
Console::writeln('/');
Console::writeln();
if ($argv[1]) {
$sign = '$';
$time = $price = 0;
$arr = explode('/', $argv[1]);
if (count($arr) == 2) {
$price = $stats['lines']['a'] / $arr[1];
$sign = $arr[0] ? $arr[0] : $sign;
} else {
$price = $stats['lines']['a'] * $arr[1];
}
$time = round($stats['lines']['a'] / 1500);
Console::writeln('Price: ' . Price::show($price) . $sign . ', Time: ' . $time . ' days.');
Console::writeln();
}
//Console::writeln('DONE');