public function links($relType, $urn = null)
    {
        $rawLinks = [];
        if (!empty($this->links->$relType)) {
            $rawLinks = $this->links->$relType;
        }
        $links = new CollectionDocJsonLinks($rawLinks, $this->_auth);

        // optionally filter by urn
        if ($urn) {
            return $links->rels([$urn]);
        } else {
            return $links;
        }
    }
public function links($relType, $urn = null)
    {
        $rawLinks = [];
        if (!empty($this->links->$relType)) {
            $rawLinks = $this->links->$relType;
        }
        $links = new CollectionDocJsonLinks($rawLinks, $this->_auth);

        // optionally filter by urn
        if ($urn) {
            return $links->rels([$urn]);
        } else {
            return $links;
        }
    }
public function links ( $ relType , $ urn = null ) { $ rawLinks = [ ] ; if ( ! empty ( $ this -> links -> $ relType ) ) { $ rawLinks = $ this -> links -> $ relType ; } $ links = new CollectionDocJsonLinks ( $ rawLinks , $ this -> _auth ) ; // optionally filter by urn if ( $ urn ) { return $ links -> rels ( [ $ urn ] ) ; } else { return $ links ; } }
Get array of links by relation type

@param string $relType type of relation
@param string $urn the uniform resource name to look for
@return CollectionDocJsonLinks the links object
Get array of links by relation type