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 Link implements JsonSerializable
{
use MetaTrait;
protected $href;
public function __construct($href, $meta = null)
$this->href = $href;
$this->meta = $meta;
}
public function setHref($href)
public function jsonSerialize()
return $this->meta ? ['href' => $this->href, 'meta' => $this->meta] : $this->href;