protected function collection($data, $transformer, $resourceKey = null)
    {
        if (empty($data)) {
            return new FractalNullResource;
        }

        return new FractalCollection($data, $transformer, $resourceKey);
    }
protected function collection($data, $transformer, $resourceKey = null)
    {
        if (empty($data)) {
            return new FractalNullResource;
        }

        return new FractalCollection($data, $transformer, $resourceKey);
    }
protected function collection ( $ data , $ transformer , $ resourceKey = null ) { if ( empty ( $ data ) ) { return new FractalNullResource ; } return new FractalCollection ( $ data , $ transformer , $ resourceKey ) ; }
Create a new collection resource object.

@author Morten Rugaard <moru@nodes.dk>

@param  mixed                                              $data
@param  \Nodes\Api\Transformer\TransformerAbstract|callable $transformer
@param  string                                             $resourceKey
@return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
Create a new collection resource object .