protected function getGroupsByNames(array $dns = [], $fields = [])
    {
        $query = $this->query->newInstance();

        return $query->newCollection($dns)->map(function ($dn) use ($query, $fields) {
            return $query->select($fields)->findByDn($dn);
        })->filter(function ($group) {
            return $group instanceof Group;
        });
    }
protected function getGroupsByNames(array $dns = [], $fields = [])
    {
        $query = $this->query->newInstance();

        return $query->newCollection($dns)->map(function ($dn) use ($query, $fields) {
            return $query->select($fields)->findByDn($dn);
        })->filter(function ($group) {
            return $group instanceof Group;
        });
    }
protected function getGroupsByNames ( array $ dns = [ ] , $ fields = [ ] ) { $ query = $ this -> query -> newInstance ( ) ; return $ query -> newCollection ( $ dns ) -> map ( function ( $ dn ) use ( $ query , $ fields ) { return $ query -> select ( $ fields ) -> findByDn ( $ dn ) ; } ) -> filter ( function ( $ group ) { return $ group instanceof Group ; } ) ; }
Retrieves groups by their distinguished name.

@param array $dns
@param array $fields

@return Collection
Retrieves groups by their distinguished name .