code: protected function getUrlFromLink($link)
      {
          $url = $this->expandUrl($link->getHref());
          if ($link->getAttribute('target')) {
              $url->setTarget($link->getAttribute('target'));
          }
  
          return $url;
      }
docs: Converts a link tag into a target URL.
  
  @param SimpleAnchorTag $link    Parsed link.
  
  @return SimpleUrl            URL with frame target if any.