/** * @return mixed */ public function getDN() { return $this->connection->getDn(); }
/** * Return whether the given object DN is related to the given base DN * * Will use the current connection's root DN if $baseDn is not given. * * @param string $dn The object DN to check * @param string $baseDn The base DN to compare the object DN with * * @return bool */ protected function isRelatedDn($dn, $baseDn = null) { $normalizedDn = strtolower(join(',', array_map('trim', explode(',', $dn)))); $normalizedBaseDn = strtolower(join(',', array_map('trim', explode(',', $baseDn ?: $this->ds->getDn())))); return strpos($normalizedDn, $normalizedBaseDn) !== false; }