예제 #1
0
 public function __construct()
 {
     // Get current connection instance
     $connection = Ioc::resolve('connection');
     $this->mongoDB = $connection->getMongoDB();
     $this->mongo = new MB($this->mongoDB);
 }
예제 #2
0
 /**
  * Main Exec fucniton
  * @throws Exception
  */
 public function exec()
 {
     echo "START: " . date("Y-m-d H:i:s") . " \n";
     switch ($this->dataType) {
         case 'TRN':
             $this->updateTransactions();
             break;
         case 'SEC':
             $this->updateSecurities();
             break;
         case 'POS':
             $this->updatePositions();
             break;
         case 'TXT':
             $this->updateRealized();
             break;
         case 'CBL':
             $this->updateUnrealized();
             break;
         case 'CBP':
             $this->updateUnrealized();
             break;
         case 'TWR':
             $this->updateTwrCalculator();
             break;
         default:
             self::help();
             throw new Exception("No executible function found. Most likely it's incorrect data Type.\n");
     }
     echo "DONE: " . date("Y-m-d H:i:s") . " \n";
     // Send all bugs
     $bugTracker = Ioc::resolve('bugTracker');
     $bugTracker->send();
 }
예제 #3
0
 public function __construct()
 {
     $this->log = Ioc::resolve('log');
 }