PHP 클래스 Mongolid\Serializer\Type\UTCDateTime

상속: implements Mongolid\Serializer\SerializableTypeInterface, implements JsonSerializabl\JsonSerializable
파일 보기 프로젝트 열기: leroy-merlin-br/mongolid 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$mongoDate MongoDB\BSON\UTCDateTime
$timestamp integer

공개 메소드들

메소드 설명
__call ( string $method, array $args = [] ) : mixed A wrapper to use this class as MongoUTCDateTime.
__construct ( integer | MongoDB\BSON\UTCDateTime | null $datetime = null ) Constructor.
__toString ( ) : string Allows casting to string utilizing drivers UTCDateTime implementation.
convert ( ) : MongoDB\BSON\UTCDateTime
jsonSerialize ( ) : string
serialize ( ) : string
toLocalDateTime ( ) : DateTime Retrieve a DateTime object with proper timezone set.
unserialize ( mixed $data ) : void

보호된 메소드들

메소드 설명
init ( integer | MongoDB\BSON\UTCDateTime | null $datetime ) : boolean Initializes timestamp and mongoDate variables.

메소드 상세

__call() 공개 메소드

A wrapper to use this class as MongoUTCDateTime.
public __call ( string $method, array $args = [] ) : mixed
$method string Method of MongoUTCDateTime to call.
$args array Arguments to pass.
리턴 mixed

__construct() 공개 메소드

Constructor.
public __construct ( integer | MongoDB\BSON\UTCDateTime | null $datetime = null )
$datetime integer | MongoDB\BSON\UTCDateTime | null MongoUTCDateTime or Timestamp to wrap. If it was null, uses current timestamp.

__toString() 공개 메소드

Allows casting to string utilizing drivers UTCDateTime implementation.
public __toString ( ) : string
리턴 string Returns the string representation of this UTCDateTime.

convert() 공개 메소드

public convert ( ) : MongoDB\BSON\UTCDateTime
리턴 MongoDB\BSON\UTCDateTime

init() 보호된 메소드

Initializes timestamp and mongoDate variables.
protected init ( integer | MongoDB\BSON\UTCDateTime | null $datetime ) : boolean
$datetime integer | MongoDB\BSON\UTCDateTime | null MongoUTCDateTime or Timestamp to wrap. If it was null, uses current timestamp.
리턴 boolean

jsonSerialize() 공개 메소드

public jsonSerialize ( ) : string
리턴 string

serialize() 공개 메소드

public serialize ( ) : string
리턴 string

toLocalDateTime() 공개 메소드

Retrieve a DateTime object with proper timezone set.
public toLocalDateTime ( ) : DateTime
리턴 DateTime

unserialize() 공개 메소드

public unserialize ( mixed $data ) : void
$data mixed Serialized string to parse.
리턴 void

프로퍼티 상세

$mongoDate 보호되어 있는 프로퍼티

protected UTCDateTime,MongoDB\BSON $mongoDate
리턴 MongoDB\BSON\UTCDateTime

$timestamp 보호되어 있는 프로퍼티

protected int $timestamp
리턴 integer