LdapTools\Object\LdapObjectCollection::toArray PHP Method

toArray() public method

Returns an array of LdapObjects. To get the results in a simple array for you should change the hydration when executing the query.
public toArray ( ) : LdapObject[]
return LdapObject[]
    public function toArray()
    {
        return $this->objects;
    }

Usage Example

 function it_should_sort_on_multiple_attributes_asc()
 {
     $this->beConstructedWith(['firstName' => 'ASC', 'lastName' => 'ASC']);
     $this->sort($this->toSort)->shouldHaveFirstValue('lastName', 'Feng');
     $this->sort($this->toSort)->shouldHaveFirstValue('firstName', 'Amy');
     $this->sort($this->collection->toArray())->shouldHaveFirstValue('lastName', 'Feng');
     $this->sort($this->collection->toArray())->shouldHaveFirstValue('firstName', 'Amy');
 }
All Usage Examples Of LdapTools\Object\LdapObjectCollection::toArray