Source for file Datevariable.php

Documentation is available at Datevariable.php

  1. <?php  if defined('BASEPATH')) exit('No direct script access allowed');
  2. /** 
  3.  * A symbol that represents Date values. DateVariable encapulates {@link http://us2.php.net/manual/en/function.strtotime.php strtotime}, which parses any English textual datetime description into a Unix timestamp.
  4.  * @author Greg Swindle <greg@swindle.net>
  5.  * @version 0.3
  6.  * @package Phprules
  7.  */
  8.  
  9.  /**
  10.  * A symbol that represents Date values. DateVariable encapulates {@link http://us2.php.net/manual/en/function.strtotime.php strtotime}, which parses any English textual datetime description into a Unix timestamp.
  11.  * @package Phprules
  12.  */
  13. class DateVariable extends Variable {
  14. /**
  15.  * Constructor initializes {@link $name}, and the {@link $value}.
  16.  * @access public
  17.  * @param string $name The name of the DateVariable
  18.  * @param string $value A date/time string in a {@link http://us2.php.net/manual/en/datetime.formats.php valid Date and Time format}.
  19.  */     
  20.     function DateVariable$name$value {
  21.         $v strtotime($value);
  22.         parent::Variable$name$v );
  23.     }
  24. /**
  25.  * Constructor initializes {@link $name}, and the {@link $value}.
  26.  * @access public
  27.  * @param string $name The name of the DateVariable
  28.  * @param string $value A date/time string in a {@link http://us2.php.net/manual/en/datetime.formats.php valid Date and Time format}.
  29.  */      
  30.     function __construct$name$value {
  31.         $v strtotime($value);
  32.         parent::__construct$name$v );
  33.     }
  34. /**
  35.  * Returns DateVariable.
  36.  * @access public
  37.  * @return string 
  38.  */     
  39.     function getType({
  40.         return "DateVariable";
  41.     }
  42. /**
  43.  * Returns a human-readable statement and value.
  44.  * @access public
  45.  * @return string 
  46.  */    
  47.     function toString({
  48.         return "DateVariable name = " $this->name . ", value = " $this->value;
  49.     }
  50. }
  51.  
  52. /* End of file DateVariable.php */
  53. /* Location: ./system/application/libraries/Phprules/Datevariable.php */

Documentation generated on Thu, 24 Mar 2011 21:27:38 -0500 by phpDocumentor 1.4.1