private function existsACotationWithThisDate(Cotation $cotation) { $sql = "SELECT id \r\n FROM cotations_history \r\n WHERE data = :date AND codigo = :code"; $query = $this->session->prepare($sql); $query->bindParam(":date", date("Y-m-d")); $query->bindParam(":code", $cotation->getCode()); $query->execute(); return $query->rowCount() > 0; }
public function Arabica(DateMap $map) { parent::Cotation($map); $this->type = "Arabica"; $this->types = new HashMap(); $this->types(); //$this->name = $this->name($this->jsonInfo->codigo); }
private function addTextToTooltipInASet($seriesname, $index, Cotation $cotation) { $text = "Abertura: " . $cotation->getOpen(); $text .= "\nFechamento: " . $cotation->getClose(); $text .= "\nMaximo: " . $cotation->getMax(); $text .= "\nMinimo: " . $cotation->getMin(); $text .= "\nData: " . $cotation->getDate(); $this->multiSeries->addAttributeToASet("tooltext", $text, $index, $seriesname); }
public static function buildLineWithCurrentFisicaOrIndicador(Cotation $cot, $bool) { $html = ""; $tdImg = self::buildImgTag($cot->getImage()) . "<a class='open-chart-window'>" . $cot->getName() . "</a>"; if ($bool) { $html .= self::buildTD($tdImg, "first-arabica"); } else { $html .= self::buildTD($tdImg, "first-indicador"); } $html .= self::buildTD($cot->getLast()); $class = $cot->getDiff() >= 0 ? "positive" : "negative"; $html .= self::buildTD($cot->getDiff(), $class); $html .= self::buildTD($cot->getClose()); return $html; }
public function BMF(DateMap $dateMap) { $this->name = "BMF"; $this->type = "BMF"; parent::Cotation($dateMap); }
public function London(DateMap $map) { parent::Cotation($map); $this->name = "Londres"; $this->type = "London"; }
public function EuroCom(DateMap $map) { $this->name = "Euro"; $this->type = "Euro"; parent::Cotation($map); }
public function NewYork(DateMap $map) { $this->name = "NY"; $this->type = "NY"; parent::Cotation($map); }
public function DolarCom(DateMap $dateMap) { $this->name = "DÓLAR"; $this->type = "Dolar"; parent::Cotation($dateMap); }