function __construct($dn = NULL, $fields = NULL, $ds = NULL, $bind = NULL) { global $oldap_ds; global $oldap_bind; parent::__construct(); if ($dn === NULL) { $this->dn[] = OLDAP_DN1; $this->dn[] = OLDAP_DN; } else { if (is_array($dn)) { foreach ($dn as $d) { $this->dn[] = $d; } } else { $this->dn[0] = $dn; } } if ($ds === NULL) { $this->ds = $oldap_ds; } else { $this->ds = $ds; } if ($bind === NULL) { $this->bind = $oldap_bind; } else { $this->dind = $bind; } if ($fields === NULL) { } else { foreach ($fields as $name) { $this->_addField($name); } } }
function __construct($fields = false) { //5.2.2 parent::__construct(); if ($fields !== false) { $this->_addField($fields); // foreach ($fields as $name) { // $this->_addField($name); // } } }