PHP Class LdapTools\Security\GUID

Author: Chad Sikorra ([email protected])
Show file Open project: ldaptools/ldaptools

Protected Properties

Property Type Description
$guid The string representation of the GUID.
$guidSections The guid structure in order by section to parse using substr().
$octetSections The hexadecimal octet order based on string position.

Public Methods

Method Description
__construct ( string $guid )
__toString ( ) : string
toBinary ( ) : string Get the binary representation of the GUID string.
toString ( ) : string Get the friend string form of the GUID.

Protected Methods

Method Description
decodeFromBinary ( string $guid )
parseSection ( $hex, array $sections, boolean $octet = false ) : string Return the specified section of the hexadecimal string.

Method Details

__construct() public method

public __construct ( string $guid )
$guid string

__toString() public method

public __toString ( ) : string
return string

decodeFromBinary() protected method

protected decodeFromBinary ( string $guid )
$guid string

parseSection() protected method

Return the specified section of the hexadecimal string.
protected parseSection ( $hex, array $sections, boolean $octet = false ) : string
$hex string The full hex string.
$sections array An array of start and length (unless octet is true, then length is always 2).
$octet boolean Whether this is for octet string form.
return string The concatenated sections in upper-case.

toBinary() public method

Get the binary representation of the GUID string.
public toBinary ( ) : string
return string

toString() public method

Get the friend string form of the GUID.
public toString ( ) : string
return string

Property Details

$guid protected property

The string representation of the GUID.
protected $guid

$guidSections protected property

The guid structure in order by section to parse using substr().
protected $guidSections

$octetSections protected property

The hexadecimal octet order based on string position.
protected $octetSections