src/LdapTools/Query/LdapQuery.php
public function setOrderBy(array $orderBy)
    {
        // Validate and force the case for the direction.
        foreach ($orderBy as $attribute => $direction) {
            if (!in_array(strtoupper($direction), self::ORDER)) {
                throw new \InvalidArgumentException(sprintf(
                    'Order direction "%s" is invalid. Valid values are ASC and DESC',
                    $direction
                ));
            }
            $orderBy[$attribute] = strtoupper($direction);
        }
        $this->orderBy = $orderBy;

        return $this;
    }
public function setOrderBy(array $orderBy)
    {
        // Validate and force the case for the direction.
        foreach ($orderBy as $attribute => $direction) {
            if (!in_array(strtoupper($direction), self::ORDER)) {
                throw new \InvalidArgumentException(sprintf(
                    'Order direction "%s" is invalid. Valid values are ASC and DESC',
                    $direction
                ));
            }
            $orderBy[$attribute] = strtoupper($direction);
        }
        $this->orderBy = $orderBy;

        return $this;
    }
public function setOrderBy ( array $ orderBy ) { // Validate and force the case for the direction. foreach ( $ orderBy as $ attribute => $ direction ) { if ( ! in_array ( strtoupper ( $ direction ) , self :: ORDER ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Order direction "%s" is invalid. Valid values are ASC and DESC' , $ direction ) ) ; } $ orderBy [ $ attribute ] = strtoupper ( $ direction ) ; } $ this -> orderBy = $ orderBy ; return $ this ; }
Set the attributes to order the results by.

@param array $orderBy In the form of ['attribute' => 'ASC', ...]
@return $this
Set the attributes to order the results by .