/** * We are going to use cc_show_days as a template, to generate Show Instances. This function * is basically a dispatcher that looks at the show template, and sends it to the correct function * so that Show Instance generation can begin. After the all show instances have been created, pushes * the schedule to Pypo. * * @param array $p_showRow * A row from cc_show_days table * @param DateTime $p_populateUntilDateTime * DateTime object in UTC time. */ private static function populateShow($p_showDaysRow, $p_populateUntilDateTime) { // TODO : use constants instead of int values here? or maybe php will // get enum types by the time somebody gets around to fix this. -- RG if ($p_showDaysRow["repeat_type"] == -1) { Application_Model_Show::populateNonRepeatingShow($p_showDaysRow, $p_populateUntilDateTime); } elseif ($p_showDaysRow["repeat_type"] == 0) { Application_Model_Show::populateRepeatingShow($p_showDaysRow, $p_populateUntilDateTime, 'P7D'); } elseif ($p_showDaysRow["repeat_type"] == 1) { Application_Model_Show::populateRepeatingShow($p_showDaysRow, $p_populateUntilDateTime, 'P14D'); } elseif ($p_showDaysRow["repeat_type"] == 2) { Application_Model_Show::populateRepeatingShow($p_showDaysRow, $p_populateUntilDateTime, 'P1M'); } Application_Model_RabbitMq::PushSchedule(); }