Beispiel #1
0
Datei: Dn.php Projekt: raZ3l/zf2
 /**
  * Undoes the conversion done by {@link escapeValue()}.
  *
  * Any escape sequence starting with a baskslash - hexpair or special character -
  * will be transformed back to the corresponding character.
  * @see    Net_LDAP2_Util::escape_dn_value() from Benedikt Hallinger <*****@*****.**>
  * @link   http://pear.php.net/package/Net_LDAP2
  * @author Benedikt Hallinger <*****@*****.**>
  *
  * @param  string|array $values Array of DN Values
  * @return array Same as $values, but unescaped
  */
 public static function unescapeValue($values = array())
 {
     if (!is_array($values)) {
         $values = array($values);
     }
     foreach ($values as $key => $val) {
         // strip slashes from special chars
         $val = str_replace(array('\\\\', '\\,', '\\+', '\\"', '\\<', '\\>', '\\;', '\\#', '\\='), array('\\', ',', '+', '"', '<', '>', ';', '#', '='), $val);
         $values[$key] = Converter\Converter::hex32ToAsc($val);
     }
     return count($values) == 1 ? $values[0] : $values;
 }
 public function testSettingSubjectOnlyWithInterface()
 {
     $this->markTestIncomplete();
     $obj = new \Converter\Converter();
     try {
         $obj->setObject('test');
     } catch (Exception $e) {
         $this->assertTrue(true);
     }
 }