code: public function getGroups() : array
      {
          $rSearch = ldap_search( $this->_rConnect , $this->_sBase , "objectclass=group" , array("cn") );
          $aEntries = ldap_get_entries($this->_rConnect, $rSearch);
          $aGroups = array();
  
          for ( $i = 0 ; $i < $aEntries["count"] ; $i++ ) {
              
              $aGroups[] = utf8_encode($aEntries[$i]["dn"]);
          }
  
          return $aGroups;
      }
docs: Get groups
  
  @access public
  @return array