本文整理汇总了PHP中Stock::getNext方法的典型用法代码示例。如果您正苦于以下问题:PHP Stock::getNext方法的具体用法?PHP Stock::getNext怎么用?PHP Stock::getNext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stock
的用法示例。
在下文中一共展示了Stock::getNext方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: StockCrawler
echo "<th bgcolor='#e0f0ff'>前日終値</th>";
echo "<th bgcolor='#e0f0ff'>前日高値</th>";
echo "<th bgcolor='#e0f0ff'>前日安値</th>";
echo "<th bgcolor='#e0f0ff'>始値</th>";
echo "<th bgcolor='#e0f0ff'>高値</th>";
echo "<th bgcolor='#e0f0ff'>安値</th>";
echo "<th bgcolor='#e0f0ff'>現在値</th>";
echo "<th bgcolor='#e0f0ff'>GU/GD</th>";
echo "<th bgcolor='#e0f0ff'>前日高値/安値ブレイク</th>";
echo "<th bgcolor='#e0f0ff'>削除</th>";
echo "</tr>";
$count = 1;
foreach ($monitorStocks as $code) {
echo "<tr>";
$stock->getStockDayInfoFromCode($code . "-T", $beforeDate);
$beforeStock = $stock->getNext();
$crawler = new StockCrawler();
$crawler->getStockPrice($code);
$beforeClosingPrice = $beforeStock["終値"];
$beforeHighPrice = $beforeStock["高値"];
$beforeLowPrice = $beforeStock["安値"];
$openingPrice = $crawler->getOpeningPrice();
$highPrice = $crawler->getHighPrice();
$lowPrice = $crawler->getLowPrice();
$nowPrice = $crawler->getNowPrice();
// GU/GD 判定
$gugd = "-";
if ($openingPrice > $beforeHighPrice) {
$gugd = "GU +" . Common::changeStockFormat($openingPrice - $beforeHighPrice);
} else {
if ($openingPrice < $beforeLowPrice) {
示例2: count
<?php
$stock->getPrepare($date, $selectedMarkets, $closingPrice, $rangePrice, $volume, $unitShares, $unitVolume, $sort, $order);
echo "<table rules='all' border='1' cellspacing='0' cellpadding='2' style='font-size : 14px;' bordercolor='#a0b0ff'>";
echo "<caption>{$date}</caption>";
echo "<tr>";
// 項目行
echo "<th bgcolor='#e0f0ff'>No.</th>";
foreach ($stock->getItemsName() as $item) {
echo "<th bgcolor='#e0f0ff'>{$item}</th>";
}
echo "</tr>";
$count = 1;
while ($result = $stock->getNext()) {
echo "<tr>";
echo "<td align='right'>" . $count . "</td>";
$keys = array_keys($result);
$countMax = count($keys);
for ($i = 0; $i < $countMax; $i++) {
$key = $keys[$i];
$value = $result[$key];
if ($i >= 3 && is_numeric($value)) {
$colorValue = "000000";
$prefixValue = "";
$suffixValue = "";
if ($key === '前日比') {
$colorValue = colorForValue($value);
$prefixValue = $value < 0 ? "▼" : "▲";
}