Exemplo n.º 1
0
 /**
  * fetches batch_id on the basis of batch info given
  * 
  * @param string $department_id
  * @param string $programme_id
  * @param date $batch_start
  * @return array|false
  */
 private function findBatchIds($batch_start = null, $department_id = null, $programme_id = null)
 {
     $batch_start_basis = null;
     $department_id_basis = null;
     $programme_id_basis = null;
     $batch = new Core_Model_Batch();
     if ($batch_start) {
         $batch_start_basis = true;
         $batch->setBatch_start($batch_start);
     }
     if ($department_id) {
         $department_id_basis = true;
         $batch->setDepartment_id($department_id);
     }
     if ($programme_id) {
         $programme_id_basis = true;
         $batch->setProgramme_id($programme_id);
     }
     $batch_ids = $batch->fetchBatchIds($batch_start_basis, $department_id_basis, $programme_id_basis);
     Zend_Registry::get('logger')->debug($batch_ids);
     if (is_array($batch_ids)) {
         return $batch_ids;
     } else {
         return false;
     }
 }