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;
trait LinksTrait
{
/**
* The links.
* @var array
protected $links = [];
* Get the links.
* @return array
public function getLinks()
return $this->links;
}
* Replace the links.
* @param array $links
public function replaceLinks(array $links)
$this->links = $links;
* Set a link.
* @param string $key
* @param string|Link $value
public function setLink($key, $value)
$this->links[$key] = $value;
* Remove a link.
public function removeLink($key)
unset($this->links[$key]);