Overview

Namespaces

  • Peach
    • DF
    • DT
    • Http
      • Body
      • Header
    • Markup
    • Util

Classes

  • AbstractTime
  • Clock
  • Date
  • Datetime
  • DefaultClock
  • FixedClock
  • FormatWrapper
  • HttpDateFormat
  • OffsetClock
  • ShiftFormat
  • SimpleFormat
  • TimeEquator
  • Timestamp
  • TimeWrapper
  • UnixTimeFormat
  • Util
  • W3cDatetimeFormat

Interfaces

  • Format
  • Time
  • Overview
  • Namespace
  • Class

Class TimeWrapper

既存の時間オブジェクトを機能拡張するためのラッパークラスです. このクラスは Decorator パターンで設計されています.

Peach\DT\TimeWrapper implements Peach\DT\Time
Namespace: Peach\DT
Located at Peach/DT/TimeWrapper.php
Methods summary
public
# __construct( Peach\DT\Time $original )

指定された時間オブジェクトをラップする TimeWrapper を構築します.

指定された時間オブジェクトをラップする TimeWrapper を構築します.

Parameters

$original
ラップ対象の時間オブジェクト
public Peach\DT\Time
# getOriginal( )

ラップ対象の時間オブジェクトを返します.

ラップ対象の時間オブジェクトを返します.

Returns

Peach\DT\Time
public integer
# getType( )

ラップ対象のオブジェクトのタイプを返します.

ラップ対象のオブジェクトのタイプを返します.

Returns

integer

Implementation of

Peach\DT\Time::getType()
public boolean
# before( Peach\DT\Time $time )

ラップ対象のオブジェクトの before メソッドを実行します.

ラップ対象のオブジェクトの before メソッドを実行します.

Parameters

$time

Returns

boolean

Implementation of

Peach\DT\Time::before()
public boolean
# after( Peach\DT\Time $time )

ラップ対象のオブジェクトの after メソッドを実行します.

ラップ対象のオブジェクトの after メソッドを実行します.

Parameters

$time

Returns

boolean

Implementation of

Peach\DT\Time::after()
public boolean
# compareTo( Peach\DT\Time $subject )

ラップ対象のオブジェクトの compareTo メソッドを実行します.

ラップ対象のオブジェクトの compareTo メソッドを実行します.

Parameters

$subject

Returns

boolean

Implementation of

Peach\Util\Comparable::compareTo()
protected Peach\DT\TimeWrapper
# newInstance( Peach\DT\Time $instance )

指定されたインスタンスをラップする新しい TimeWrapper を構築します.

指定されたインスタンスをラップする新しい TimeWrapper を構築します.

Parameters

$instance
ラップ対象のオブジェクト

Returns

Peach\DT\TimeWrapper

Codecoverageignore

public Peach\DT\TimeWrapper
# add( string $field, integer $amount )

ラップ対象のオブジェクトの add メソッドを実行し, その返り値をこのクラスでラップします.

ラップ対象のオブジェクトの add メソッドを実行し, その返り値をこのクラスでラップします.

Parameters

$field
$amount

Returns

Peach\DT\TimeWrapper

Implementation of

Peach\DT\Time::add()
public Peach\DT\TimeWrapper
# set( string $field, integer $value )

ラップ対象のオブジェクトの set メソッドを実行し, その返り値をこのクラスでラップします.

ラップ対象のオブジェクトの set メソッドを実行し, その返り値をこのクラスでラップします.

Parameters

$field
$value

Returns

Peach\DT\TimeWrapper

Implementation of

Peach\DT\Time::set()
public Peach\DT\TimeWrapper
# setAll( array|Peach\Util\ArrayMap $subject )

ラップ対象のオブジェクトの setAll メソッドを実行し, その返り値をこのクラスでラップします.

ラップ対象のオブジェクトの setAll メソッドを実行し, その返り値をこのクラスでラップします.

Parameters

$subject

Returns

Peach\DT\TimeWrapper

Implementation of

Peach\DT\Time::setAll()
public integer
# get( string $field )

ラップ対象のオブジェクトの get メソッドを実行します.

ラップ対象のオブジェクトの get メソッドを実行します.

Parameters

$field

Returns

integer

Implementation of

Peach\DT\Time::get()
public string
# format( Peach\DT\Format $format = null )

ラップ対象のオブジェクトの format メソッドを実行します.

ラップ対象のオブジェクトの format メソッドを実行します.

Parameters

$format

Returns

string

Implementation of

Peach\DT\Time::format()
public string
# formatTime( )

ラップ対象のオブジェクトの formatTime メソッドを実行します.

ラップ対象のオブジェクトの formatTime メソッドを実行します.

Returns

string

Implementation of

Peach\DT\Time::formatTime()
public boolean
# equals( mixed $obj )

指定されたオブジェクトとこのオブジェクトを比較します. compareTo による比較結果が 0 を返し, かつクラスが同じ場合に TRUE を返します.

指定されたオブジェクトとこのオブジェクトを比較します. compareTo による比較結果が 0 を返し, かつクラスが同じ場合に TRUE を返します.

Parameters

$obj
比較対象のオブジェクト

Returns

boolean
二つのオブジェクトが等しい場合に TRUE, それ以外は FALSE

Implementation of

Peach\DT\Time::equals()
public integer
# getDateCount( )

ラップ対象のオブジェクトの getDateCount メソッドを実行します.

ラップ対象のオブジェクトの getDateCount メソッドを実行します.

Returns

integer

Implementation of

Peach\DT\Time::getDateCount()
public integer
# getDay( )

ラップ対象のオブジェクトの getDay メソッドを実行します.

ラップ対象のオブジェクトの getDay メソッドを実行します.

Returns

integer

Implementation of

Peach\DT\Time::getDay()
public boolean
# isLeapYear( )

ラップ対象のオブジェクトの isLeapYear メソッドを実行します.

ラップ対象のオブジェクトの isLeapYear メソッドを実行します.

Returns

boolean

Implementation of

Peach\DT\Time::isLeapYear()
public Peach\DT\Time
# toDate( )

ラップ対象のオブジェクトの toDate メソッドを実行します.

ラップ対象のオブジェクトの toDate メソッドを実行します.

Returns

Peach\DT\Time

Implementation of

Peach\DT\Time::toDate()
public Peach\DT\Time
# toDatetime( )

ラップ対象のオブジェクトの toDatetime メソッドを実行します.

ラップ対象のオブジェクトの toDatetime メソッドを実行します.

Returns

Peach\DT\Time

Implementation of

Peach\DT\Time::toDatetime()
public Peach\DT\Time
# toTimestamp( )

ラップ対象のオブジェクトの toTimestamp メソッドを実行します.

ラップ対象のオブジェクトの toTimestamp メソッドを実行します.

Returns

Peach\DT\Time

Implementation of

Peach\DT\Time::toTimestamp()
public string
# __toString( Peach\DT\Time $time,… )

ラップ対象のオブジェクトの __toString メソッドを実行します.

ラップ対象のオブジェクトの __toString メソッドを実行します.

Parameters

$time,…

Returns

string
Constants inherited from Peach\DT\Time
FRIDAY, MONDAY, SATURDAY, SUNDAY, THURSDAY, TUESDAY, TYPE_DATE, TYPE_DATETIME, TYPE_TIMESTAMP, WEDNESDAY
PEACH2 API documentation generated by ApiGen