Horde_Ldap::_quoteRDN PHP Метод

_quoteRDN() защищенный статический Метод

Takes an RDN array with an attribute name and value and properly quotes it according to RFC 1485.
protected static _quoteRDN ( array $attribute ) : string
$attribute array A tuple containing the attribute name and that attribute's value which make up the RDN.
Результат string The properly quoted string RDN.
    protected static function _quoteRDN($attribute)
    {
        $rdn = $attribute[0] . '=';
        // See if we need to quote the value.
        if (preg_match('/^\\s|\\s$|\\s\\s|[,+="\\r\\n<>#;]/', $attribute[1])) {
            $rdn .= '"' . str_replace('"', '\\"', $attribute[1]) . '"';
        } else {
            $rdn .= $attribute[1];
        }
        return $rdn;
    }