Example #1
0
 function __construct($startDate, $slutdate)
 {
     $this->endDate = $slutdate;
     $this->startDate = $startDate;
     $this->typePointer = 0;
     $this->datePointer = $startDate;
     $month = array();
     $i = $startDate;
     while ($i <= $slutdate) {
         $month[$i] = $i;
         $i += 86400;
     }
     foreach ($month as $date) {
         $this->schema[$date][0] = WishFactory::createShift($date, 0);
         $this->schema[$date][1] = WishFactory::createShift($date, 1);
         $this->schema[$date][2] = WishFactory::createShift($date, 2);
         $this->schema[$date][3] = WishFactory::createShift($date, 3);
     }
 }
Example #2
0
<?php

require_once 'WishFactory.php';
require_once '../Models.php';
define('MODELS', 'models');
$models = new Models('localhost', 'fadl', 'vaip', 'fadl');
WishFactory::applyAll(1230768000, 1233273600);
WishFactory::commitSchema(1230768000, 1233273600);
echo "ALL DONE";