src/Classes/AdldapExchange.php
public function all($fields = [], $sorted = true, $sortBy = 'cn', $sortByDirection = 'asc')
    {
        $namingContext = $this->getConfigurationNamingContext();

        if ($namingContext) {
            $search = $this->adldap->search()
                ->setDn($namingContext)
                ->select($fields)
                ->where('objectCategory', '=', $this->serverObjectCategory);

            if ($sorted) {
                $search->sortBy($sortBy, $sortByDirection);
            }

            return $search->get();
        }

        return false;
    }
public function all($fields = [], $sorted = true, $sortBy = 'cn', $sortByDirection = 'asc')
    {
        $namingContext = $this->getConfigurationNamingContext();

        if ($namingContext) {
            $search = $this->adldap->search()
                ->setDn($namingContext)
                ->select($fields)
                ->where('objectCategory', '=', $this->serverObjectCategory);

            if ($sorted) {
                $search->sortBy($sortBy, $sortByDirection);
            }

            return $search->get();
        }

        return false;
    }
public function all ( $ fields = [ ] , $ sorted = true , $ sortBy = 'cn' , $ sortByDirection = 'asc' ) { $ namingContext = $ this -> getConfigurationNamingContext ( ) ; if ( $ namingContext ) { $ search = $ this -> adldap -> search ( ) -> setDn ( $ namingContext ) -> select ( $ fields ) -> where ( 'objectCategory' , '=' , $ this -> serverObjectCategory ) ; if ( $ sorted ) { $ search -> sortBy ( $ sortBy , $ sortByDirection ) ; } return $ search -> get ( ) ; } return false ; }
Returns all exchange servers.

@param array  $fields
@param bool   $sorted
@param string $sortBy
@param string $sortByDirection

@return array|bool
Returns all exchange servers .