Hal\Resource::__construct PHP Method

__construct() public method

public __construct ( string | SelfLink $href, array $data = [], string | null $title = null, string | null $name = null, string | null $hreflang = null )
$href string | SelfLink
$data array
$title string | null
$name string | null
$hreflang string | null
    public function __construct($href, array $data = array(), $title = null, $name = null, $hreflang = null)
    {
        if (!$href instanceof SelfLink) {
            $href = $this->createLink($href, $title, $name, $hreflang);
        }
        $this->setLink($href);
        $this->setData($data);
    }