org\parser\driver\Markdown::_doImages_reference_callback PHP Метод

_doImages_reference_callback() защищенный Метод

protected _doImages_reference_callback ( $matches )
    protected function _doImages_reference_callback($matches)
    {
        $whole_match = $matches[1];
        $alt_text = $matches[2];
        $link_id = strtolower($matches[3]);
        if ("" == $link_id) {
            $link_id = strtolower($alt_text);
            # for shortcut links like ![this][].
        }
        $alt_text = $this->encodeAttribute($alt_text);
        if (isset($this->urls[$link_id])) {
            $url = $this->encodeAttribute($this->urls[$link_id]);
            $result = "<img src=\"{$url}\" alt=\"{$alt_text}\"";
            if (isset($this->titles[$link_id])) {
                $title = $this->titles[$link_id];
                $title = $this->encodeAttribute($title);
                $result .= " title=\"{$title}\"";
            }
            $result .= $this->empty_element_suffix;
            $result = $this->hashPart($result);
        } else {
            # If there's no such link ID, leave intact:
            $result = $whole_match;
        }
        return $result;
    }