propel-util
[ class tree: propel-util ] [ index: propel-util ] [ all elements ]

Class: PropelDateTime

Source Location: /util/PropelDateTime.php

Class Overview

DateTime
   |
   --PropelDateTime

DateTime subclass which supports serialization.


Author(s):

  • Alan Pinstein
  • Soenke Ruempler
  • Hans Lellelid

Methods


Inherited Constants

Class: DateTime (Internal Class)

ATOM = 'Y-m-d\\TH:i:sP'
COOKIE = 'l, d-M-y H:i:s T'
ISO8601 = 'Y-m-d\\TH:i:sO'
RFC822 = 'D, d M y H:i:s O'
RFC850 = 'l, d-M-y H:i:s T'
RFC1036 = 'D, d M y H:i:s O'
RFC1123 = 'D, d M Y H:i:s O'
RFC2822 = 'D, d M Y H:i:s O'
RFC3339 = 'Y-m-d\\TH:i:sP'
RSS = 'D, d M Y H:i:s O'
W3C = 'Y-m-d\\TH:i:sP'

Inherited Methods

Class: DateTime (Internal Class)

constructor __construct ( )
format ( )
getOffset ( )
getTimezone ( )
modify ( )
setDate ( )
setISODate ( )
setTime ( )
setTimezone ( )

Class Details

[line 34]
DateTime subclass which supports serialization.

Currently Propel is not using this for storing date/time objects within model objeects; however, we are keeping it in the repository because it is useful if you want to store a DateTime object in a session.




Tags:

author:  Alan Pinstein
author:  Soenke Ruempler
author:  Hans Lellelid


[ Top ]


Class Methods


static method newInstance [line 54]

static void newInstance( string $date, [ $tz = null])

Convenience method to enable a more fluent API.



Tags:

access:  public


Parameters:

string   $date   Date/time value.
DateTimeZone   $tz   (optional) timezone

[ Top ]

method __sleep [line 69]

array __sleep( )

PHP "magic" function called when object is serialized.

Sets an internal property with the date string and returns properties of class that should be serialized.




Tags:

return:  string[]


[ Top ]

method __wakeup [line 82]

void __wakeup( )

PHP "magic" function called when object is restored from serialized state.

Calls DateTime constructor with previously stored string value of date.




[ Top ]


Documentation generated on Thu, 22 Nov 2007 03:33:52 +0000 by phpDocumentor 1.4.0