for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of JSON-API.
*
* (c) Toby Zerner <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tobscure\JsonApi;
use JsonSerializable;
class ResourceIdentifier implements JsonSerializable
{
use MetaTrait;
private $type;
private $id;
public function __construct($type, $id)
$this->type = $type;
$this->id = $id;
}
public function jsonSerialize()
return array_filter(
[
'type' => $this->type,
'id' => $this->id,
'meta' => $this->meta
]
);