Class StorableTime

Description

This is the StorablePrimitive equivalent of Time.

Located in /harmoni/core/dataManager/storablePrimitives/StorableTime.class.php (line 13)

SObject
   |
   --Magnitude
      |
      --DateAndTime
         |
         --StorableTime
Variable Summary
mixed $_table
Method Summary
void alterQuery (mixed $query)
object asABlob ()
object asADateTime ()
object asAFloat ()
object asAInteger ()
object asAShortString ()
object asAString ()
object StorableTime current ([optional $class = 'StorableTime'])
object StorableTime epoch ([optional $class = 'StorableTime'])
object StorableTime fromString (string $aString, [optional $class = 'StorableTime'])
object Timestamp fromUnixTimeStamp (integer $aUnixTimeStamp, [optional $class = 'StorableTime'])
integer insert (integer $dbID)
string makeSearchString (ref $value, [int $searchType = SEARCH_TYPE_EQUALS])
object StorableTime midnight ([optional $class = 'StorableTime'])
object StorableTime noon ([optional $class = 'StorableTime'])
object StorableTime now ([optional $class = 'StorableTime'])
void prune (integer $dbID, integer $dataID)
object StorableTime today ([optional $class = 'StorableTime'])
object StorableTime tomorrow ([optional $class = 'StorableTime'])
void update (integer $dbID, integer $dataID)
object StorableTime withDateAndTime (optional $aDate, mixed $aTime, [mixed $class = 'StorableTime'])
object StorableTime withJulianDayNumber (integer $aJulianDayNumber, [optional $class = 'StorableTime'])
void withYearDay (integer $anIntYear, integer $anIntDayOfYear, [optional $class = 'StorableTime'])
object StorableTime withYearDayHourMinuteSecond (integer $anIntYear, integer $anIntDayOfYear, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, [optional $class = 'StorableTime'])
object StorableTime withYearDayHourMinuteSecondOffset (integer $anIntYear, integer $anIntDayOfYear, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, object Duration $aDurationOffset, [optional $class = 'StorableTime'])
object StorableTime withYearMonthDay (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, [optional $class = 'StorableTime'])
object StorableTime withYearMonthDayHourMinute (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, integer $anIntHour, integer $anIntMinute, [optional $class = 'StorableTime'])
object StorableTime withYearMonthDayHourMinuteSecond (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, [optional $class = 'StorableTime'])
object StorableTime withYearMonthDayHourMinuteSecondOffset (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, object Duration $aDurationOffset, [optional $class = 'StorableTime'])
object StorableTime yesterday ([optional $class = 'StorableTime'])
Variables
mixed $_table (line 17)

Inherited Variables

Inherited from DateAndTime

DateAndTime::$jdn
DateAndTime::$offset
DateAndTime::$seconds
Methods
alterQuery (line 495)

Takes an existing SelectQuery and adds a table join and some columns so that when it is executed the actual data can be retrieved from the row. The join condition must be "fk_data = data_id_field", since the field "fk_data" is already part of the DataManager's table structure.

  • access: public
void alterQuery (mixed $query)
asABlob (line 602)

Convert this object to a StorableBlob

  • since: 6/9/06
  • access: public
object asABlob ()
asADateTime (line 635)

Convert this object to a StorableTime

  • since: 6/9/06
  • access: public
object asADateTime ()
asAFloat (line 658)

Convert this object to a StorableFloat

  • since: 6/9/06
  • access: public
object asAFloat ()
asAInteger (line 646)

Convert this object to a StorableInteger

  • since: 6/9/06
  • access: public
object asAInteger ()
asAShortString (line 624)

Convert this object to a StorableShortString

  • since: 6/9/06
  • access: public
object asAShortString ()
asAString (line 613)

Convert this object to a StorableString

  • since: 6/9/06
  • access: public
object asAString ()
createAndPopulate (line 34)

Takes a single database row, which would contain the columns added by alterQuery() and extracts the values to setup the object with the appropriate data.

All times are stored in the database as UTC.

  • static:
  • access: public
object StorableTime createAndPopulate (array $dbRow)
  • array $dbRow
current (line 121)

Answer a StorableTime representing now

  • since: 5/13/05
  • access: public
object StorableTime current ([optional $class = 'StorableTime'])
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.
epoch (line 138)

Answer a StorableTime representing the Squeak epoch: 1 January 1901

  • static:
  • since: 5/2/05
  • access: public
object StorableTime epoch ([optional $class = 'StorableTime'])
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::epoch()
Answer a new instance representing the Squeak epoch: 1 January 1901
fromString (line 165)

Answer a new instance represented by a string:

  • '-1199-01-05T20:33:14.321-05:00'
  • ' 2002-05-16T17:20:45.00000001+01:01'
  • ' 2002-05-16T17:20:45.00000001'
  • ' 2002-05-16T17:20'
  • ' 2002-05-16T17:20:45'
  • ' 2002-05-16T17:20:45+01:57'
  • ' 2002-05-16T17:20:45-02:34'
  • ' 2002-05-16T17:20:45+00:00'
  • ' 1997-04-26T01:02:03+01:02:3'

  • static:
  • since: 5/12/05
  • access: public
object StorableTime fromString (string $aString, [optional $class = 'StorableTime'])
  • string $aString: The input string.
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::fromString()
Answer a new instance represented by a string:
fromUnixTimeStamp (line 182)

Create a new TimeStamp from a UNIX timestamp.

  • since: 5/27/05
  • access: public
object Timestamp fromUnixTimeStamp (integer $aUnixTimeStamp, [optional $class = 'StorableTime'])
  • integer $aUnixTimeStamp: The number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT/UTC)
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.
insert (line 507)

Inserts a new row into the Database with the data contained in the object.

  • return: Returns the new ID of the data stored.
  • access: public
integer insert (integer $dbID)
  • integer $dbID: The DBHandler database ID to query.
makeSearchString (line 57)

Returns a string that could be inserted into an SQL query's WHERE clause, based on the Primitive value that is passed. It is used when searching for datasets that contain a certain field=value pair.

  • return: or NULL if no searching is allowed.
  • static:
string makeSearchString (ref $value, [int $searchType = SEARCH_TYPE_EQUALS])
  • int $searchType: One of the SEARCH_TYPE_* constants, defining what type of search this should be (ie, equals, contains, greater than, less than, etc)
  • ref $value: object $value The Primitive object to search for.
midnight (line 201)

Answer a new instance starting at midnight local time.

  • static:
  • since: 5/3/05
  • access: public
object StorableTime midnight ([optional $class = 'StorableTime'])
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::midnight()
Answer a new instance starting at midnight local time.
noon (line 233)

Answer a new instance starting at noon local time.

  • static:
  • since: 5/3/05
  • access: public
object StorableTime noon ([optional $class = 'StorableTime'])
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::noon()
Answer a new instance starting at noon local time.
now (line 217)

Answer the current time.

  • static:
  • since: 5/12/05
  • access: public
object StorableTime now ([optional $class = 'StorableTime'])
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::now()
Answer the current date and time.
prune (line 575)

Deletes the data row from the appropriate table.

  • access: public
void prune (integer $dbID, integer $dataID)
  • integer $dbID: The DBHandler database ID to query.
  • integer $dataID: The ID in the database of the data to be deleted.
today (line 249)

Answer a new instance representing today

  • static:
  • since: 5/12/05
  • access: public
object StorableTime today ([optional $class = 'StorableTime'])
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::today()
Answer a new instance representing today
tomorrow (line 265)

Answer a new instance representing tomorow

  • static:
  • since: 5/12/05
  • access: public
object StorableTime tomorrow ([optional $class = 'StorableTime'])
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::tomorrow()
Answer a new instance representing tomorow
update (line 542)

Uses the ID passed and updates the database row with new data.

  • access: public
void update (integer $dbID, integer $dataID)
  • integer $dbID: The DBHandler database ID to query.
  • integer $dataID: The ID in the database of the data to be updated.
withDateAndTime (line 281)

Create a new instance from Date and Time objects

  • static:
  • since: 5/12/05
  • access: public
object StorableTime withDateAndTime (optional $aDate, mixed $aTime, [mixed $class = 'StorableTime'])
  • optional $aDate: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::withDateAndTime()
Create a new instance from Date and Time objects
withJulianDayNumber (line 298)

Create a new instance for a given Julian Day Number.

  • static:
  • since: 5/2/05
  • access: public
object StorableTime withJulianDayNumber (integer $aJulianDayNumber, [optional $class = 'StorableTime'])
  • integer $aJulianDayNumber
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::withJulianDayNumber()
Create a new new instance for a given Julian Day Number.
withYearDay (line 315)

Create a new instance.

  • since: 5/4/05
  • static:
  • access: public
void withYearDay (integer $anIntYear, integer $anIntDayOfYear, [optional $class = 'StorableTime'])
  • integer $anIntYear
  • integer $anIntDayOfYear
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::withYearDay()
Create a new instance.
withYearDayHourMinuteSecond (line 336)

Create a new instance.

  • since: 5/4/05
  • static:
  • access: public
object StorableTime withYearDayHourMinuteSecond (integer $anIntYear, integer $anIntDayOfYear, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, [optional $class = 'StorableTime'])
  • integer $anIntYear
  • integer $anIntDayOfYear
  • integer $anIntHour
  • integer $anIntMinute
  • integer $anIntSecond
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::withYearDayHourMinuteSecond()
Create a new instance.
withYearDayHourMinuteSecondOffset (line 361)

Create a new instance.

  • since: 5/4/05
  • static:
  • access: public
object StorableTime withYearDayHourMinuteSecondOffset (integer $anIntYear, integer $anIntDayOfYear, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, object Duration $aDurationOffset, [optional $class = 'StorableTime'])
  • integer $anIntYear
  • integer $anIntDayOfYear
  • integer $anIntHour
  • integer $anIntMinute
  • integer $anIntSecond
  • object Duration $aDurationOffset
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::withYearDayHourMinuteSecondOffset()
Create a new instance.
withYearMonthDay (line 383)

Create a new instance.

  • since: 5/4/05
  • static:
  • access: public
object StorableTime withYearMonthDay (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, [optional $class = 'StorableTime'])
  • integer $anIntYear
  • integer $anIntOrStringMonth
  • integer $anIntDay
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::withYearMonthDay()
Create a new instance.
withYearMonthDayHourMinute (line 407)

Create a new instance.

  • since: 5/4/05
  • static:
  • access: public
object StorableTime withYearMonthDayHourMinute (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, integer $anIntHour, integer $anIntMinute, [optional $class = 'StorableTime'])
  • integer $anIntYear
  • integer $anIntOrStringMonth
  • integer $anIntDay
  • integer $anIntHour
  • integer $anIntMinute
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::withYearMonthDayHourMinute()
Create a new instance.
withYearMonthDayHourMinuteSecond (line 432)

Create a new instance.

  • since: 5/4/05
  • static:
  • access: public
object StorableTime withYearMonthDayHourMinuteSecond (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, [optional $class = 'StorableTime'])
  • integer $anIntYear
  • integer $anIntOrStringMonth
  • integer $anIntDay
  • integer $anIntHour
  • integer $anIntMinute
  • integer $anIntSecond
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::withYearMonthDayHourMinuteSecond()
Create a new instance.
withYearMonthDayHourMinuteSecondOffset (line 458)

Create a new instance.

  • since: 5/4/05
  • static:
  • access: public
object StorableTime withYearMonthDayHourMinuteSecondOffset (integer $anIntYear, integer $anIntOrStringMonth, integer $anIntDay, integer $anIntHour, integer $anIntMinute, integer $anIntSecond, object Duration $aDurationOffset, [optional $class = 'StorableTime'])
  • integer $anIntYear
  • integer $anIntOrStringMonth
  • integer $anIntDay
  • integer $anIntHour
  • integer $anIntMinute
  • integer $anIntSecond
  • object Duration $aDurationOffset
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::withYearMonthDayHourMinuteSecondOffset()
Create a new instance.
yesterday (line 479)

Answer a new instance representing yesterday

  • static:
  • since: 5/12/05
  • access: public
object StorableTime yesterday ([optional $class = 'StorableTime'])
  • optional $class: string $class DO NOT USE OUTSIDE OF PACKAGE. This parameter is used to get around the limitations of not being able to find the class of the object that recieved the initial method call.

Redefinition of:
DateAndTime::yesterday()
Answer a new instance representing yesterday

Inherited Methods

Inherited From DateAndTime

DateAndTime::asDate()
DateAndTime::asDateAndTime()
DateAndTime::asDuration()
DateAndTime::asLocal()
DateAndTime::asMonth()
DateAndTime::asSeconds()
DateAndTime::asTime()
DateAndTime::asTimeStamp()
DateAndTime::asUTC()
DateAndTime::asWeek()
DateAndTime::asYear()
DateAndTime::atMidnight()
DateAndTime::atNoon()
DateAndTime::clockPrecision()
DateAndTime::day()
DateAndTime::dayMonthYearArray()
DateAndTime::dayOfMonth()
DateAndTime::dayOfWeek()
DateAndTime::dayOfWeekAbbreviation()
DateAndTime::dayOfWeekName()
DateAndTime::dayOfYear()
DateAndTime::daysInMonth()
DateAndTime::daysInYear()
DateAndTime::daysLeftInYear()
DateAndTime::duration()
DateAndTime::epoch()
DateAndTime::firstDayOfMonth()
DateAndTime::fromString()
DateAndTime::hmsString()
DateAndTime::hour()
DateAndTime::hour12()
DateAndTime::hour24()
DateAndTime::isEqualTo()
DateAndTime::isLeapYear()
DateAndTime::isLessThan()
DateAndTime::julianDayNumber()
DateAndTime::localOffset()
DateAndTime::localTimeZone()
DateAndTime::mdyString()
DateAndTime::meridianAbbreviation()
DateAndTime::middleOf()
DateAndTime::midnight()
DateAndTime::minus()
DateAndTime::minute()
DateAndTime::month()
DateAndTime::monthAbbreviation()
DateAndTime::monthIndex()
DateAndTime::monthName()
DateAndTime::noon()
DateAndTime::now()
DateAndTime::offset()
DateAndTime::plus()
DateAndTime::printableString()
DateAndTime::second()
DateAndTime::ticks()
DateAndTime::ticksOffset()
DateAndTime::timeZone()
DateAndTime::timeZoneAbbreviation()
DateAndTime::timeZoneName()
DateAndTime::to()
DateAndTime::toBy()
DateAndTime::today()
DateAndTime::tomorrow()
DateAndTime::utcOffset()
DateAndTime::withDateAndTime()
DateAndTime::withJulianDayNumber()
DateAndTime::withOffset()
DateAndTime::withYearDay()
DateAndTime::withYearDayHourMinuteSecond()
DateAndTime::withYearDayHourMinuteSecondOffset()
DateAndTime::withYearMonthDay()
DateAndTime::withYearMonthDayHourMinute()
DateAndTime::withYearMonthDayHourMinuteSecond()
DateAndTime::withYearMonthDayHourMinuteSecondOffset()
DateAndTime::year()
DateAndTime::yesterday()
DateAndTime::ymdString()
DateAndTime::_normalize()

Inherited From Magnitude

Magnitude::isBetween()
Magnitude::isEqualTo()
Magnitude::isGreaterThan()
Magnitude::isGreaterThanOrEqualTo()
Magnitude::isLessThan()
Magnitude::isLessThanOrEqualTo()
Magnitude::max()
Magnitude::min()

Inherited From SObject

SObject::asA()
SObject::asString()
SObject::copy()
SObject::copySameFrom()
SObject::copyTwoLevel()
SObject::deepCopy()
SObject::isEqual()
SObject::isEqualTo()
SObject::isNotEqualTo()
SObject::isNotReferenceTo()
SObject::isReferenceTo()
SObject::newFrom()
SObject::postCopy()
SObject::printableString()
SObject::shallowCopy()
SObject::_deepCopyArray()

Documentation generated on Wed, 19 Sep 2007 10:26:52 -0400 by phpDocumentor 1.3.0RC3