/**
  * @param string $cronHours
  * @param Noovias_Cron_Data_CronExpression $data
  */
 protected function convertHours($cronHours, Noovias_Cron_Data_CronExpression &$data)
 {
     if (strpos($cronHours, '/') !== false) {
         $data->setHourOption(Noovias_Cron_Data_CronExpression::OPTION_EVERYX);
         preg_match('#\\*/(\\d+)#', $cronHours, $pockets);
         if (array_key_exists(1, $pockets)) {
             $data->setEveryXHours($pockets[1]);
         } else {
             throw new Exception('Every x hours parameter wrong.');
         }
     } elseif (strpos($cronHours, ',') !== false) {
         $data->setHourOption(Noovias_Cron_Data_CronExpression::OPTION_SPECIFY);
         $data->setSpecifyHours(explode(',', $cronHours));
     } elseif (strpos($cronHours, '-') !== false) {
         $data->setHourOption(Noovias_Cron_Data_CronExpression::OPTION_FROMTO);
         preg_match('#(\\d+)-(\\d+)#', $cronHours, $pockets);
         if (array_key_exists(1, $pockets) && array_key_exists(2, $pockets)) {
             $data->setFromHour($pockets[1]);
             $data->setToHour($pockets[2]);
         } else {
             throw new Exception('From hour or to hour parameter wrong.');
         }
     } elseif ($cronHours === '*') {
         $data->setHourOption(Noovias_Cron_Data_CronExpression::OPTION_EVERY);
     } elseif (is_numeric($cronHours)) {
         $data->setHourOption(Noovias_Cron_Data_CronExpression::OPTION_SPECIFY);
         $data->setSpecifyHours(array($cronHours));
     }
 }