예제 #1
0
 public function allTrackers()
 {
     $projectId = 1556;
     $client = new Client("https://portal.optimusinfo.com/redmine/", 'vikas.singhal', 'vzi950');
     $projectInfo = $client->api('project')->show($projectId);
     //echo "<pre>";print_r($projectInfo);die;
     $trackers = new Trackers();
     foreach ($projectInfo['project']['trackers'] as $key => $tracker) {
         $trackers->exchangeArray($tracker);
         $this->getTrackersTable()->saveTrackers($trackers);
     }
     return true;
 }
예제 #2
0
 public function allTrackers($client)
 {
     $allTracker = $client->api('tracker')->all(array('limit' => 1000));
     try {
         $trackers = new Trackers();
         foreach ($allTracker['trackers'] as $key => $tracker) {
             $trackers->exchangeArray($tracker);
             $this->getTrackersTable()->saveTrackers($trackers);
         }
     } catch (\Exception $ex) {
         //send mail if any error occur during CRON JOB
     }
 }