for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
/*
* This file is part of the FiveLab Resource package
*
* (c) FiveLab
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code
*/
namespace FiveLab\Component\Resource\Resource\Relation;
use FiveLab\Component\Resource\Resource\Href\HrefInterface;
/**
* The default relation for resource.
* @author Vitaliy Zhuk <[email protected]>
class Relation implements RelationInterface
{
* @var string
private $name;
* @var HrefInterface
private $href;
* @var array
private $attributes;
* Constructor.
* @param string $name
* @param HrefInterface $href
* @param array $attributes
public function __construct(string $name, HrefInterface $href, array $attributes = [])
$this->name = $name;
$this->href = $href;
$this->attributes = $attributes;
}
* {@inheritdoc}
public function getName(): string
return $this->name;
public function getHref(): HrefInterface
return $this->href;
public function setHref(HrefInterface $href): void
public function getAttributes(): array
return $this->attributes;
public function setAttributes(array $attributes): void