src/HalLinkContainer.php
public function get($rel)
    {
        if (array_key_exists($rel, $this)) {
            return $this[$rel];
        }

        if (isset($this['curies'])) {
            foreach ($this['curies'] as $link) {
                $prefix = strstr($link->getUri(), '{rel}', true);
                if (strpos($rel, $prefix) === 0) {
                    // looks like it is
                    $shortrel = substr($rel, strlen($prefix));
                    $attrs = $link->getAttributes();
                    $curie = "{$attrs['name']}:$shortrel";
                    if (isset($this[$curie])) {
                        return $this[$curie];
                    }
                }
            }
        }

        return false;
    }
public function get($rel)
    {
        if (array_key_exists($rel, $this)) {
            return $this[$rel];
        }

        if (isset($this['curies'])) {
            foreach ($this['curies'] as $link) {
                $prefix = strstr($link->getUri(), '{rel}', true);
                if (strpos($rel, $prefix) === 0) {
                    // looks like it is
                    $shortrel = substr($rel, strlen($prefix));
                    $attrs = $link->getAttributes();
                    $curie = "{$attrs['name']}:$shortrel";
                    if (isset($this[$curie])) {
                        return $this[$curie];
                    }
                }
            }
        }

        return false;
    }
public function get ( $ rel ) { if ( array_key_exists ( $ rel , $ this ) ) { return $ this [ $ rel ] ; } if ( isset ( $ this [ 'curies' ] ) ) { foreach ( $ this [ 'curies' ] as $ link ) { $ prefix = strstr ( $ link -> getUri ( ) , '{rel}' , true ) ; if ( strpos ( $ rel , $ prefix ) === 0 ) { // looks like it is $ shortrel = substr ( $ rel , strlen ( $ prefix ) ) ; $ attrs = $ link -> getAttributes ( ) ; $ curie = "{$attrs['name']}:$shortrel" ; if ( isset ( $ this [ $ curie ] ) ) { return $ this [ $ curie ] ; } } } } return false ; }
Retrieve a link from the container by rel. Also resolve any curie links
if they are set.

@param string $rel
The link relation required.
@return array|bool
Link if found. Otherwise false.
Retrieve a link from the container by rel . Also resolve any curie links if they are set .