public function __construct() { // Get current connection instance $connection = Ioc::resolve('connection'); $this->mongoDB = $connection->getMongoDB(); $this->mongo = new MB($this->mongoDB); }
/** * 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(); }
public function __construct() { $this->log = Ioc::resolve('log'); }