protected function serializeEmbeddedCollection(MapperInterface $mapper, array $collection)
    {
        $data = array();
        foreach ($collection as $object) {
            $data[] = $mapper->serialize($object);
        }

        return $data;
    }
protected function serializeEmbeddedCollection(MapperInterface $mapper, array $collection)
    {
        $data = array();
        foreach ($collection as $object) {
            $data[] = $mapper->serialize($object);
        }

        return $data;
    }
protected function serializeEmbeddedCollection ( MapperInterface $ mapper , array $ collection ) { $ data = array ( ) ; foreach ( $ collection as $ object ) { $ data [ ] = $ mapper -> serialize ( $ object ) ; } return $ data ; }
Serialize an embedded collection

Return a collection of hydrated objects

@param MapperInterface $mapper
@param array           $collection

@return array
Serialize an embedded collection