1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 07:02:34 +01:00
invoiceninja/app/Ninja/Serializers/ArraySerializer.php
2015-12-14 22:07:48 +02:00

19 lines
548 B
PHP

<?php namespace App\Ninja\Serializers;
use League\Fractal\Serializer\ArraySerializer as FractalArraySerializer;
class ArraySerializer extends FractalArraySerializer
{
public function collection($resourceKey, array $data)
{
return $data;
//return ($resourceKey && $resourceKey !== 'data') ? array($resourceKey => $data) : $data;
}
public function item($resourceKey, array $data)
{
return $data;
//return ($resourceKey && $resourceKey !== 'data') ? array($resourceKey => $data) : $data;
}
}