Esempio n. 1
0
 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;
 }
Esempio n. 2
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);
 }
Esempio n. 4
0
 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;
 }
Esempio n. 5
0
 public function BMF(DateMap $dateMap)
 {
     $this->name = "BMF";
     $this->type = "BMF";
     parent::Cotation($dateMap);
 }
Esempio n. 6
0
 public function London(DateMap $map)
 {
     parent::Cotation($map);
     $this->name = "Londres";
     $this->type = "London";
 }
Esempio n. 7
0
 public function EuroCom(DateMap $map)
 {
     $this->name = "Euro";
     $this->type = "Euro";
     parent::Cotation($map);
 }
Esempio n. 8
0
 public function NewYork(DateMap $map)
 {
     $this->name = "NY";
     $this->type = "NY";
     parent::Cotation($map);
 }
Esempio n. 9
0
 public function DolarCom(DateMap $dateMap)
 {
     $this->name = "DÓLAR";
     $this->type = "Dolar";
     parent::Cotation($dateMap);
 }