. * */ namespace OCA\user_ldap\lib; abstract class BackendBase { protected $ldap; public function __construct() { $this->ldap = new LDAP(); } /** * @brief sets the LDAP Wrapper to be used * * @param $ldapWrapper an instance of the Wrapper * @return true on success, otherwise false * * The LDAP Wrapper must implement the PHP LDAP functions, which are used * in the LDAP backend */ public function setLDAPWrapper($ldapWrapper) { if(is_object($ldapWrapper)) { unset($this->ldap); $this->ldap = $ldapWrapper; return true; } return false; } }