src/Micrometa/Ports/Item/ItemObjectModel.php
public function link($type = null, $index = null)
    {
        // One-time caching of link elements
        if ($this->links === null) {
            $this->cacheLinkTypeItems();
        }

        // Find the matching LinkType items
        $links = ($type === null) ? $this->links->getItems() : $this->links->getItems($type);

        // Return link item(s)
        return ($index === null) ? new ItemList($links) : $this->getLinkIndex($links, $type, $index);
    }
public function link($type = null, $index = null)
    {
        // One-time caching of link elements
        if ($this->links === null) {
            $this->cacheLinkTypeItems();
        }

        // Find the matching LinkType items
        $links = ($type === null) ? $this->links->getItems() : $this->links->getItems($type);

        // Return link item(s)
        return ($index === null) ? new ItemList($links) : $this->getLinkIndex($links, $type, $index);
    }
public function link ( $ type = null , $ index = null ) { // One-time caching of link elements if ( $ this -> links === null ) { $ this -> cacheLinkTypeItems ( ) ; } // Find the matching LinkType items $ links = ( $ type === null ) ? $ this -> links -> getItems ( ) : $ this -> links -> getItems ( $ type ) ; // Return link item(s) return ( $ index === null ) ? new ItemList ( $ links ) : $ this -> getLinkIndex ( $ links , $ type , $ index ) ; }
Return all link declarations of a particular type

@param string|null $type Link type
@param int|null $index   Optional: particular index

@return ItemInterface|ItemListInterface Single LinkType item or list of LinkType items
@api
Return all link declarations of a particular type