explodeDn() public static method

Converts a string distinguished name into its separate pieces.
public static explodeDn ( string $dn, integer $withAttributes = 1 ) : array
$dn string
$withAttributes integer Set to 0 to get the attribute names along with the value.
return array
 /**
  * {@inheritdoc}
  */
 public function fromLdap($dn)
 {
     $options = $this->getOptionsArray();
     if (!(isset($options['display_dn']) && $options['display_dn'])) {
         $dn = LdapUtilities::explodeDn($dn);
         $dn = reset($dn);
     }
     return $dn;
 }