src/Classes/AdldapUtils.php
public function strGuidToHex($strGUID)
    {
        $strGUID = str_replace('-', '', $strGUID);

        $octet_str = '\\'.substr($strGUID, 6, 2);
        $octet_str .= '\\'.substr($strGUID, 4, 2);
        $octet_str .= '\\'.substr($strGUID, 2, 2);
        $octet_str .= '\\'.substr($strGUID, 0, 2);
        $octet_str .= '\\'.substr($strGUID, 10, 2);
        $octet_str .= '\\'.substr($strGUID, 8, 2);
        $octet_str .= '\\'.substr($strGUID, 14, 2);
        $octet_str .= '\\'.substr($strGUID, 12, 2);

        $length = (strlen($strGUID) - 2);

        for ($i = 16; $i <= $length; $i++) {
            if (($i % 2) == 0) {
                $octet_str .= '\\'.substr($strGUID, $i, 2);
            }
        }

        return $octet_str;
    }
public function strGuidToHex($strGUID)
    {
        $strGUID = str_replace('-', '', $strGUID);

        $octet_str = '\\'.substr($strGUID, 6, 2);
        $octet_str .= '\\'.substr($strGUID, 4, 2);
        $octet_str .= '\\'.substr($strGUID, 2, 2);
        $octet_str .= '\\'.substr($strGUID, 0, 2);
        $octet_str .= '\\'.substr($strGUID, 10, 2);
        $octet_str .= '\\'.substr($strGUID, 8, 2);
        $octet_str .= '\\'.substr($strGUID, 14, 2);
        $octet_str .= '\\'.substr($strGUID, 12, 2);

        $length = (strlen($strGUID) - 2);

        for ($i = 16; $i <= $length; $i++) {
            if (($i % 2) == 0) {
                $octet_str .= '\\'.substr($strGUID, $i, 2);
            }
        }

        return $octet_str;
    }
public function strGuidToHex ( $ strGUID ) { $ strGUID = str_replace ( '-' , '' , $ strGUID ) ; $ octet_str = '\\' . substr ( $ strGUID , 6 , 2 ) ; $ octet_str .= '\\' . substr ( $ strGUID , 4 , 2 ) ; $ octet_str .= '\\' . substr ( $ strGUID , 2 , 2 ) ; $ octet_str .= '\\' . substr ( $ strGUID , 0 , 2 ) ; $ octet_str .= '\\' . substr ( $ strGUID , 10 , 2 ) ; $ octet_str .= '\\' . substr ( $ strGUID , 8 , 2 ) ; $ octet_str .= '\\' . substr ( $ strGUID , 14 , 2 ) ; $ octet_str .= '\\' . substr ( $ strGUID , 12 , 2 ) ; $ length = ( strlen ( $ strGUID ) - 2 ) ; for ( $ i = 16 ; $ i <= $ length ; $ i ++ ) { if ( ( $ i % 2 ) == 0 ) { $ octet_str .= '\\' . substr ( $ strGUID , $ i , 2 ) ; } } return $ octet_str ; }
Converts a string GUID to a hexdecimal value so it can be queried.

@param string $strGUID A string representation of a GUID

@return string
Converts a string GUID to a hexdecimal value so it can be queried .