Example #1
0
 /**
  * Loop through companies and retrieve directors.
  * Save directors to database or raise soft error event
  * then proceed to quote.
  *
  * @param array $companies
  */
 protected function getDirectors(array $companies)
 {
     foreach ($companies as $company) {
         try {
             $directors = $this->soap->getDirectorsBySymbol($this->options, $company->symbol);
             Director::saveResponse($directors, $company->symbol);
         } catch (Exception $exception) {
             $this->raiseEvent($company->symbol, $exception, 'Could not retrieve directors data for ' . $company->name);
         }
         $this->getQuote($company);
     }
 }