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