src/Resources/CollectionRestResource.php
protected function createCollectionResourceForItems($items, $from, $to, $count)
    {
        $resource = parent::get();
        $resource->items = $items;
        $resource->count = $count;
        $resource->range = new \stdClass();
        $resource->range->from = $from;
        $resource->range->to = $to;

        return $resource;
    }
protected function createCollectionResourceForItems($items, $from, $to, $count)
    {
        $resource = parent::get();
        $resource->items = $items;
        $resource->count = $count;
        $resource->range = new \stdClass();
        $resource->range->from = $from;
        $resource->range->to = $to;

        return $resource;
    }
protected function createCollectionResourceForItems ( $ items , $ from , $ to , $ count ) { $ resource = parent :: get ( ) ; $ resource -> items = $ items ; $ resource -> count = $ count ; $ resource -> range = new \ stdClass ( ) ; $ resource -> range -> from = $ from ; $ resource -> range -> to = $ to ; return $ resource ; }
Creates a valid collection response from a list of objects.

@param Collection|\stdClass[] $items
@param int $from
@param int $to
@param int $count
@return \stdClass
Creates a valid collection response from a list of objects .