Example #1
0
 /**
  * @Route("/hello/{name}")
  * @Template()
  */
 public function indexAction()
 {
     $saoDatabase = new SaoDatabase();
     $cucCach = array("Thủy nhị cục", "Mộc tam cục", "Kim tứ cục", "Thổ ngủ cục", "Hỏa lục cục");
     $binhchu = new BinhChu();
     $urlFileXml = realpath($this->get('kernel')->getRootDir() . "/../db/" . 'tuvi.xml');
     $binhchu::LoadFromFile($urlFileXml);
     $dChiGio = 1;
     $dChiGio = 1;
     $thangAm = 1;
     $tcNam = 6;
     $dcNam = 6;
     $gioiTinh = true;
     $anSaoDoc = new AnSao($dChiGio, $dChiGio, $thangAm, $tcNam, $dcNam, $gioiTinh);
     if ($tcNam % 2 == 1) {
         $so = 5 * (($tcNam + 1) / 2 - 1) + ($tcNam + 1) / 2 - 1;
     } else {
         $so = 5 * ($dcNam / 2 - 1) + $dcNam / 2 - 1;
     }
     $napAm = $saoDatabase->NapAm[$so];
     $cuc = $cucCach[$anSaoDoc->Cuc - 2];
     $boSaoCung = $anSaoDoc->PhanCung();
     return array('name' => 'hello');
 }
Example #2
0
 private function PhiLocKinhDa($tc)
 {
     $lt = array(3, 4, 6, 7, 6, 7, 9, 10, 12, 1);
     $pos = $lt[$tc - 1];
     $this->BoSao[$this->CurPos] = new Sao(27, $pos, 'B');
     $this->BoSao[$this->CurPos]->IsPhiTinh = true;
     $this->CurPos++;
     $pos = AnSao::XetSo($pos + 1);
     $this->BoSao[$this->CurPos] = new Sao(52, $pos, 'B');
     $this->BoSao[$this->CurPos]->IsPhiTinh = true;
     $this->CurPos++;
     $pos = AnSao::XetSo($pos - 2);
     $this->BoSao[$this->CurPos] = new Sao(51, $pos, 'B');
     $this->BoSao[$this->CurPos]->IsPhiTinh = true;
     $this->CurPos++;
 }