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);
 }
Esempio n. 2
0
 private function saveOrUpdateCotations(PDOStatement $query, Cotation $cotation)
 {
     //$query = $this->session->prepare($sql);
     $query->bindParam(":code", $cotation->getCode());
     $query->bindParam(":open", str_replace(",", "", $cotation->getOpen()));
     $query->bindParam(":close", str_replace(",", "", $cotation->getClose()));
     $query->bindParam(":max", str_replace(",", "", $cotation->getMax()));
     $query->bindParam(":min", str_replace(",", "", $cotation->getMin()));
     $query->bindParam(":diff", str_replace(",", "", $cotation->getDiff()));
     $query->bindParam(":openCont", str_replace(",", "", $cotation->openContracts()));
     $query->bindParam(":date", date('Y-m-d'));
     $query->execute();
     return $query->rowCount();
 }