CC-4961: Show linking

This commit is contained in:
denise 2013-03-12 11:33:32 -04:00
parent c721b81a13
commit 438200425a
1 changed files with 12 additions and 12 deletions

View File

@ -1,16 +1,16 @@
<?php <?php
define("NO_REPEAT", -1);
define("REPEAT_WEEKLY", 0);
define("REPEAT_BI_WEEKLY", 1);
define("REPEAT_MONTHLY_MONTHLY", 2);
define("REPEAT_MONTHLY_WEEKLY", 3);
class Application_Service_ShowInstanceService class Application_Service_ShowInstanceService
{ {
private $service_show; private $service_show;
private $service_showDays; private $service_showDays;
private $service_user; private $service_user;
const NO_REPEAT = -1;
const REPEAT_WEEKLY = 0;
const REPEAT_BI_WEEKLY = 1;
const REPEAT_MONTHLY_MONTHLY = 2;
const REPEAT_MONTHLY_WEEKLY = 3;
public function __construct() public function __construct()
{ {
$this->service_show = new Application_Service_ShowService(); $this->service_show = new Application_Service_ShowService();
@ -31,19 +31,19 @@ class Application_Service_ShowInstanceService
foreach ($showDays as $day) { foreach ($showDays as $day) {
switch ($day["repeat_type"]) { switch ($day["repeat_type"]) {
case self::NO_REPEAT: case NO_REPEAT:
$this->createNonRepeatingShowInstance($day, $populateUntil, $isRebroadcast); $this->createNonRepeatingShowInstance($day, $populateUntil, $isRebroadcast);
break; break;
case self::REPEAT_WEEKLY: case REPEAT_WEEKLY:
$this->createWeeklyRepeatingShowInstances($day, $populateUntil, "P7D", $isRebroadcast); $this->createWeeklyRepeatingShowInstances($day, $populateUntil, "P7D", $isRebroadcast);
break; break;
case self::REPEAT_BI_WEEKLY: case REPEAT_BI_WEEKLY:
$this->createWeeklyRepeatingShowInstances($day, $populateUntil, "P14D", $isRebroadcast); $this->createWeeklyRepeatingShowInstances($day, $populateUntil, "P14D", $isRebroadcast);
break; break;
case self::REPEAT_MONTHLY_MONTHLY: case REPEAT_MONTHLY_MONTHLY:
$this->createMonthlyRepeatingShowInstances($day, $populateUntil, "P1M", $isRebroadcast); $this->createMonthlyRepeatingShowInstances($day, $populateUntil, "P1M", $isRebroadcast);
break; break;
case self::REPEAT_MONTHLY_WEEKLY: case REPEAT_MONTHLY_WEEKLY:
// do something here // do something here
break; break;
} }