PHP Class LdapTools\Utilities\TSPropertyArray

See also: https://msdn.microsoft.com/en-us/library/ff635189.aspx
Author: Chad Sikorra ([email protected])
显示文件 Open project: ldaptools/ldaptools Class Usage Examples

Protected Properties

Property Type Description
$postBinary string
$signature string
$tsProperty TSProperty[]

Public Methods

Method Description
__construct ( mixed $tsPropertyArray = null ) Construct in one of the following ways:
add ( TSProperty $tsProperty ) Add a TSProperty object. If it already exists, it will be overwritten.
get ( string $propName ) : TSProperty Get a TSProperty object by its property name (ie. CtxWFProfilePath).
getPostBinary ( ) : string Get any binary data that was after the decoded binary TSPropertyArray data.
getSignature ( ) : string Get the signature value for the TSPropertyArray data.
getTSProperties ( ) : TSProperty[] Get all TSProperty objects.
has ( string $propName ) : boolean Check if a specific TSProperty exists by its property name.
isSignatureValid ( ) : boolean Check whether the signature is valid, thus signifying a valid data structure.
remove ( string $propName ) Remove a TSProperty by its property name (ie. CtxMinEncryptionLevel).
set ( string $propName, mixed $propValue ) Set the value for a specific TSProperty by its name.
toArray ( ) : array Get a simple associative array containing of all TSProperty names and values.
toBinary ( ) : string Get the full binary representation of the userParameters containing the TSPropertyArray data.

Protected Methods

Method Description
addTSPropData ( string $tsPropertyArray, integer $tsPropCount ) : integer Given the start of TSPropertyArray hex data, and the count for the number of TSProperty structures in contains, parse and split out the individual TSProperty structures. Return the full length of the TSPropertyArray data.
decode ( string $tsPropArray ) : array Given the TSPropertyArray binary data, extract out all of the TSProperty values.
getTsPropObj ( string $propName ) : TSProperty
validateProp ( string $propName )

Method Details

__construct() public method

- Pass an array of TSProperty key => value pairs (See DEFAULTS constant). - Pass the TSPropertyArray binary value. The object representation of that will be decoded and constructed. - Pass nothing and a default set of TSProperty key => value pairs will be used (See DEFAULTS constant).
public __construct ( mixed $tsPropertyArray = null )
$tsPropertyArray mixed

add() public method

Add a TSProperty object. If it already exists, it will be overwritten.
public add ( TSProperty $tsProperty )
$tsProperty TSProperty

addTSPropData() protected method

Given the start of TSPropertyArray hex data, and the count for the number of TSProperty structures in contains, parse and split out the individual TSProperty structures. Return the full length of the TSPropertyArray data.
protected addTSPropData ( string $tsPropertyArray, integer $tsPropCount ) : integer
$tsPropertyArray string
$tsPropCount integer
return integer The length of the data in the TSPropertyArray

decode() protected method

Given the TSPropertyArray binary data, extract out all of the TSProperty values.
protected decode ( string $tsPropArray ) : array
$tsPropArray string
return array

get() public method

Get a TSProperty object by its property name (ie. CtxWFProfilePath).
public get ( string $propName ) : TSProperty
$propName string
return TSProperty

getPostBinary() public method

Get any binary data that was after the decoded binary TSPropertyArray data.
public getPostBinary ( ) : string
return string

getSignature() public method

Get the signature value for the TSPropertyArray data.
public getSignature ( ) : string
return string

getTSProperties() public method

Get all TSProperty objects.
public getTSProperties ( ) : TSProperty[]
return TSProperty[]

getTsPropObj() protected method

protected getTsPropObj ( string $propName ) : TSProperty
$propName string
return TSProperty

has() public method

Check if a specific TSProperty exists by its property name.
public has ( string $propName ) : boolean
$propName string
return boolean

isSignatureValid() public method

Check whether the signature is valid, thus signifying a valid data structure.
public isSignatureValid ( ) : boolean
return boolean

remove() public method

Remove a TSProperty by its property name (ie. CtxMinEncryptionLevel).
public remove ( string $propName )
$propName string

set() public method

Set the value for a specific TSProperty by its name.
public set ( string $propName, mixed $propValue )
$propName string
$propValue mixed

toArray() public method

Get a simple associative array containing of all TSProperty names and values.
public toArray ( ) : array
return array

toBinary() public method

Get the full binary representation of the userParameters containing the TSPropertyArray data.
public toBinary ( ) : string
return string

validateProp() protected method

protected validateProp ( string $propName )
$propName string

Property Details

$postBinary protected_oe property

protected string $postBinary
return string

$signature protected_oe property

protected string $signature
return string

$tsProperty protected_oe property

protected TSProperty[],LdapTools\Utilities $tsProperty
return TSProperty[]