LdapTools\Utilities\TSProperty::getDecodedValueForProp PHP Метод

getDecodedValueForProp() защищенный Метод

Based on the property name in question, get its actual value from the binary blob value.
protected getDecodedValueForProp ( string $propName, string $propValue ) : string | integer
$propName string
$propValue string
Результат string | integer
    protected function getDecodedValueForProp($propName, $propValue)
    {
        if (in_array($propName, $this->propTypes['string'])) {
            // Strip away null terminators. I think this should be desired, otherwise it just ends in confusion.
            $value = str_replace("", '', $this->decodePropValue($propValue, true));
        } elseif (in_array($propName, $this->propTypes['time'])) {
            // Convert from microseconds to minutes (how ADUC displays it anyway, and seems the most practical).
            $value = hexdec($this->decodePropValue($propValue)) / self::TIME_CONVERSION;
        } elseif (in_array($propName, $this->propTypes['int'])) {
            $value = hexdec($this->decodePropValue($propValue));
        } else {
            $value = $this->decodePropValue($propValue);
        }
        return $value;
    }