PHP Класс LdapTools\Utilities\ADTimeSpan

См. также: https://technet.microsoft.com/en-us/library/cc753858%28v=ws.10%29.aspx
Автор: Chad Sikorra ([email protected])
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$days integer
$hours integer
$minutes integer
$never boolean
$seconds integer

Открытые методы

Метод Описание
__construct ( string $time = '' ) Pass the time in I8 format, which is represented in intervals of -100 nanoseconds.
__toString ( ) : string
getDays ( ) : integer Get the days specified for the time span.
getHours ( ) : integer Get the hours specified for the time span.
getInstance ( integer $value, string $unit ) Get an instance of the class based on a specific time unit as the second parameter.
getLdapValue ( ) : string Get the value of all the time units in the format that LDAP expects it in.
getMinutes ( ) : integer Get the minutes specified for the time span.
getNever ( ) : boolean Whether the time span value is considered 'Never'. This is a special value in AD that makes the time span indefinite and is represented by a value of -9223372036854775808.
getSeconds ( ) : integer Get the seconds specified for the time span.
setDays ( integer $days ) Set the days specified for the time span.
setHours ( integer $hours ) Set the hours specified for the time span.
setMinutes ( integer $minutes ) Set the minutes specified for the time span.
setNever ( boolean $value )
setSeconds ( integer $seconds ) Set the seconds specified for the time span.

Защищенные методы

Метод Описание
setAndVerify ( integer $value, string $interval ) Verify the value is an integer and set the correct interval value.
setValuesFromLdap ( integer $time ) Given a time format from LDAP break it down into its individual time units and set them.

Описание методов

__construct() публичный метод

Pass the time in I8 format, which is represented in intervals of -100 nanoseconds.
public __construct ( string $time = '' )
$time string

__toString() публичный метод

public __toString ( ) : string
Результат string

getDays() публичный метод

Get the days specified for the time span.
public getDays ( ) : integer
Результат integer

getHours() публичный метод

Get the hours specified for the time span.
public getHours ( ) : integer
Результат integer

getInstance() публичный статический метод

Get an instance of the class based on a specific time unit as the second parameter.
public static getInstance ( integer $value, string $unit )
$value integer The time value.
$unit string The time unit. One of the constants of this class: DAYS, HOURS, MINUTES, SECONDS.

getLdapValue() публичный метод

Get the value of all the time units in the format that LDAP expects it in.
public getLdapValue ( ) : string
Результат string

getMinutes() публичный метод

Get the minutes specified for the time span.
public getMinutes ( ) : integer
Результат integer

getNever() публичный метод

Whether the time span value is considered 'Never'. This is a special value in AD that makes the time span indefinite and is represented by a value of -9223372036854775808.
public getNever ( ) : boolean
Результат boolean

getSeconds() публичный метод

Get the seconds specified for the time span.
public getSeconds ( ) : integer
Результат integer

setAndVerify() защищенный метод

Verify the value is an integer and set the correct interval value.
protected setAndVerify ( integer $value, string $interval )
$value integer
$interval string

setDays() публичный метод

Set the days specified for the time span.
public setDays ( integer $days )
$days integer

setHours() публичный метод

Set the hours specified for the time span.
public setHours ( integer $hours )
$hours integer

setMinutes() публичный метод

Set the minutes specified for the time span.
public setMinutes ( integer $minutes )
$minutes integer

setNever() публичный метод

public setNever ( boolean $value )
$value boolean

setSeconds() публичный метод

Set the seconds specified for the time span.
public setSeconds ( integer $seconds )
$seconds integer

setValuesFromLdap() защищенный метод

Given a time format from LDAP break it down into its individual time units and set them.
protected setValuesFromLdap ( integer $time )
$time integer

Описание свойств

$days защищенное свойство

protected int $days
Результат integer

$hours защищенное свойство

protected int $hours
Результат integer

$minutes защищенное свойство

protected int $minutes
Результат integer

$never защищенное свойство

protected bool $never
Результат boolean

$seconds защищенное свойство

protected int $seconds
Результат integer