1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00
invoiceninja/app/Ninja/Serializers/ArraySerializer.php

34 lines
595 B
PHP
Raw Normal View History

2017-01-30 20:40:43 +01:00
<?php
namespace App\Ninja\Serializers;
2015-11-01 23:10:20 +01:00
use League\Fractal\Serializer\ArraySerializer as FractalArraySerializer;
/**
2017-01-30 20:40:43 +01:00
* Class ArraySerializer.
*/
2015-11-01 23:10:20 +01:00
class ArraySerializer extends FractalArraySerializer
{
/**
* @param string $resourceKey
2017-01-30 20:40:43 +01:00
* @param array $data
*
* @return array
*/
2015-11-01 23:10:20 +01:00
public function collection($resourceKey, array $data)
{
2015-12-14 21:07:48 +01:00
return $data;
2015-11-01 23:10:20 +01:00
}
/**
* @param string $resourceKey
2017-01-30 20:40:43 +01:00
* @param array $data
*
* @return array
*/
2015-11-01 23:10:20 +01:00
public function item($resourceKey, array $data)
{
2015-12-14 21:07:48 +01:00
return $data;
2015-11-01 23:10:20 +01:00
}
}