Source for file timeslotrule.php

Documentation is available at timeslotrule.php

  1. <?php
  2. /**
  3. * Test of authorisation object logic
  4. *
  5. @author    Stuart Prescott
  6. @copyright  Copyright Stuart Prescott
  7. @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  8. @version    $Id$
  9. @package    Bumblebee
  10. @subpackage Tests
  11. */
  12.  
  13.  
  14. $INC ini_get('include_path');
  15. ini_set('include_path'$INC.':../../../');
  16.  
  17. /** include the class we have to test! */
  18. include_once '../timeslotrule.php';
  19. include_once 'inc/typeinfo.php';
  20.  
  21. $p array (
  22.     #'[0-6]<00:00-08:00/*;08:00-13:00/1;13:00-18:00/1;18:00-24:00/*>',
  23.     #'[0]<00:00-24:00/0>[1-5]<00:00-09:00/0;09:00-17:00/8;17:00-24:00/0>[6]<>',
  24.     #'[0]<>[1-5]<00:00-09:00/*;09:00-17:00/8;17:00-24:00/*>[6]<>',
  25.     #'[0]<>[1-5]<00:00-09:00/0;09:00-13:00/4;13:00-17:00/2;17:00-33:00/1>[6]<>',
  26.     #'[0]<>[1-5]<09:00-13:00/4;13:00-17:00/2;17:00-33:00/1,Overnight bookings>[6]<>'
  27.         '[0]<00:00-24:00/0,Unavailable >[1]<00:00-09:00/0,Unavailable ;09:00-12:00/6;12:00-17:00/3;17:00-24:00/0,Unavailable >[2]<00:00-09:00/0,Unavailable;09:00-17:00/16;17:00-24:00/0,Unavailable>[3]<00:00-09:00/0,Unavailable ;09:00-17:00/8;17:00-24:00/0,Unavailable>[4]<00:00-09:00/0,Unavailable ;09:00-17:00/8;17:00-24:00/0,Unavailable>[5]<00:00-09:00/0,Unavailable ;09:00-17:00/2,Honours Priority;17:00-24:00/0,Unavailable>[6]<00:00-24:00/0,Unavailable>'
  28.     );
  29.  
  30. foreach ($p as $pic
  31.   $at new TimeSlotRule($pic);
  32.   echo $at->dump(0);
  33. }
  34.  
  35. #$findtest = new TimeSlotRule($p[3]);
  36. #$findtest->findNextSlot(new SimpleDate(

Documentation generated on Tue, 06 Mar 2007 10:02:04 +0000 by phpDocumentor 1.3.0