src/Common/Formatter/LinkFormatter.php
protected function getMatchFormatter($linkIdx = 1, $labelIdx = 2)
    {
        return function (array $matches) use ($linkIdx, $labelIdx) {
            $out = '<';
            $out .= $matches[$linkIdx];
            if (!empty($matches[$labelIdx])) {
                $out .= '|'.$matches[$labelIdx];
            }
            $out .= '>';

            return $out;
        };
    }
protected function getMatchFormatter($linkIdx = 1, $labelIdx = 2)
    {
        return function (array $matches) use ($linkIdx, $labelIdx) {
            $out = '<';
            $out .= $matches[$linkIdx];
            if (!empty($matches[$labelIdx])) {
                $out .= '|'.$matches[$labelIdx];
            }
            $out .= '>';

            return $out;
        };
    }
@param int $linkIdx  The index of the matches containing the resource link
@param int $labelIdx The index of the matches containing the label (if one exists)

@return \Closure A callable to be passed to preg_replace_callback