public function link($urnOrRelType, $urn = null)
    {
        $relTypeKeys = array_keys(get_object_vars($this->links));
        if ($urn) {
            $relTypeKeys = [$urnOrRelType];
        } else {
            $urn = $urnOrRelType;
        }

        // look for a matching urn within the links
        foreach ($relTypeKeys as $relType) {
            $links = $this->links($relType);
            $matching = $links->rel($urn);
            if ($matching) {
                return $matching;
            }
        }
        return null;
    }
public function link($urnOrRelType, $urn = null)
    {
        $relTypeKeys = array_keys(get_object_vars($this->links));
        if ($urn) {
            $relTypeKeys = [$urnOrRelType];
        } else {
            $urn = $urnOrRelType;
        }

        // look for a matching urn within the links
        foreach ($relTypeKeys as $relType) {
            $links = $this->links($relType);
            $matching = $links->rel($urn);
            if ($matching) {
                return $matching;
            }
        }
        return null;
    }
public function link ( $ urnOrRelType , $ urn = null ) { $ relTypeKeys = array_keys ( get_object_vars ( $ this -> links ) ) ; if ( $ urn ) { $ relTypeKeys = [ $ urnOrRelType ] ; } else { $ urn = $ urnOrRelType ; } // look for a matching urn within the links foreach ( $ relTypeKeys as $ relType ) { $ links = $ this -> links ( $ relType ) ; $ matching = $ links -> rel ( $ urn ) ; if ( $ matching ) { return $ matching ; } } return null ; }
Get a single link by urn, or relType + urn

@param string $urnOrRelType the uniform resource name to look for
@param string $urn
@return CollectionDocJsonLink the link object or null
Get a single link by urn or relType + urn