LdapTools\AttributeConverter\ConvertGPLink::getValuesForAttribute PHP Method

getValuesForAttribute() protected method

Given an array of values and the attribute to query, get the values as represent by the attribute to select.
protected getValuesForAttribute ( array $values, string $toQuery, string $toSelect ) : array
$values array
$toQuery string
$toSelect string
return array
    protected function getValuesForAttribute(array $values, $toQuery, $toSelect)
    {
        $query = new LdapQueryBuilder($this->getLdapConnection());
        $or = $query->filter()->bOr();
        foreach ($values as $value) {
            $or->add($query->filter()->eq($toQuery, $value));
        }
        $query->select($toSelect)->where($or);
        return $query->getLdapQuery()->getResult();
    }