[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 3 /* 4 * @package s9e\TextFormatter 5 * @copyright Copyright (c) 2010-2019 The s9e Authors 6 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 7 */ 8 namespace s9e\TextFormatter\Plugins\Litedown\Parser; 9 use s9e\TextFormatter\Parser\Tag; 10 trait LinkAttributesSetter 11 { 12 protected function setLinkAttributes(Tag $tag, $linkInfo, $attrName) 13 { 14 $url = \trim($linkInfo); 15 $title = ''; 16 $pos = \strpos($url, ' '); 17 if ($pos !== \false) 18 { 19 $title = \substr(\trim(\substr($url, $pos)), 1, -1); 20 $url = \substr($url, 0, $pos); 21 } 22 $tag->setAttribute($attrName, $this->text->decode($url)); 23 if ($title > '') 24 $tag->setAttribute('title', $this->text->decode($title)); 25 } 26 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |