PHP 클래스 MongoDate

파일 보기 프로젝트 열기: alcaeus/mongo-php-adapter 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$sec integer
$usec integer

공개 메소드들

메소드 설명
__construct ( integer $sec, integer $usec ) Creates a new date. If no parameters are given, the current time is used.
__toString ( ) : string Returns a string representation of this date
toBSONType ( ) : MongoDB\BSON\UTCDateTime Converts this MongoDate to the new BSON UTCDateTime type
toDateTime ( ) : DateTime Returns a DateTime object representing this date

비공개 메소드들

메소드 설명
truncateMicroSeconds ( integer $usec ) : integer

메소드 상세

__construct() 공개 메소드

Creates a new date. If no parameters are given, the current time is used.
public __construct ( integer $sec, integer $usec )
$sec integer Number of seconds since January 1st, 1970
$usec integer Microseconds

__toString() 공개 메소드

Returns a string representation of this date
public __toString ( ) : string
리턴 string

toBSONType() 공개 메소드

Converts this MongoDate to the new BSON UTCDateTime type
public toBSONType ( ) : MongoDB\BSON\UTCDateTime
리턴 MongoDB\BSON\UTCDateTime

toDateTime() 공개 메소드

Returns a DateTime object representing this date
public toDateTime ( ) : DateTime
리턴 DateTime

프로퍼티 상세

$sec 공개적으로 프로퍼티

public int $sec
리턴 integer

$usec 공개적으로 프로퍼티

public int $usec
리턴 integer