���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/rickpfrv/wiki.craftaro.com/vendor/wikimedia/parsoid/src/Ext/LST/LST.php
���ѧ٧ѧ�
<?php declare( strict_types = 1 ); namespace Wikimedia\Parsoid\Ext\LST; use Wikimedia\Parsoid\DOM\Element; use Wikimedia\Parsoid\Ext\DOMDataUtils; use Wikimedia\Parsoid\Ext\DOMUtils; use Wikimedia\Parsoid\Ext\ExtensionModule; use Wikimedia\Parsoid\Ext\ExtensionTagHandler; use Wikimedia\Parsoid\Ext\ParsoidExtensionAPI; use Wikimedia\Parsoid\Utils\DOMCompat; class LST extends ExtensionTagHandler implements ExtensionModule { /** @inheritDoc */ public function getConfig(): array { return [ 'name' => 'LST', 'tags' => [ [ 'name' => 'labeledsectiontransclusion', 'handler' => self::class, ], [ 'name' => 'labeledsectiontransclusion/begin', 'handler' => self::class, ], [ 'name' => 'labeledsectiontransclusion/end', 'handler' => self::class, ] ] ]; } /** @inheritDoc */ public function domToWikitext( ParsoidExtensionAPI $extApi, Element $node, bool $wrapperUnmodified ) { // TODO: We're keeping this serial handler around to remain backwards // compatible with stored content version 1.3.0 and below. Remove it // when those versions are no longer supported. $dp = DOMDataUtils::getDataParsoid( $node ); $src = null; if ( isset( $dp->src ) ) { $src = $dp->src; } elseif ( DOMUtils::matchTypeOf( $node, '/begin/' ) ) { $src = '<section begin="' . ( $node->getAttribute( 'content' ) ?? '' ) . '" />'; } elseif ( DOMUtils::matchTypeOf( $node, '/end/' ) ) { $src = '<section end="' . ( $node->getAttribute( 'content' ) ?? '' ) . '" />'; } else { $extApi->log( 'error', 'LST <section> without content in: ' . DOMCompat::getOuterHTML( $node ) ); $src = '<section />'; } return $src; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0.1 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�