src/Synapse/Entity/EntityIterator.php
public function getArrayCopy()
    {
        $results = array_map(function ($entity) {
            return $entity->getArrayCopy();
        }, $this->entities);

        if (! $this->paginationData) {
            return $results;
        } else {
            $data = $this->paginationData->getArrayCopy();
            $data['results'] = $results;
            return $data;
        }
    }
public function getArrayCopy()
    {
        $results = array_map(function ($entity) {
            return $entity->getArrayCopy();
        }, $this->entities);

        if (! $this->paginationData) {
            return $results;
        } else {
            $data = $this->paginationData->getArrayCopy();
            $data['results'] = $results;
            return $data;
        }
    }
public function getArrayCopy ( ) { $ results = array_map ( function ( $ entity ) { return $ entity -> getArrayCopy ( ) ; } , $ this -> entities ) ; if ( ! $ this -> paginationData ) { return $ results ; } else { $ data = $ this -> paginationData -> getArrayCopy ( ) ; $ data [ 'results' ] = $ results ; return $ data ; } }
Return an array representation of the object

Useful for turning the array of entities into a nested array,
which is then ready to be JSON encoded in a REST response.

@return array
Return an array representation of the object