Deprecated: Optional parameter $keys declared before required parameter $cms_id is implicitly treated as a required parameter in /home/www/dev/work/class/blog/CmsKey.php on line 75

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$title is deprecated in /home/www/dev/work/website/lvesu/class/controller/blog/php.php on line 28

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$outlink is deprecated in /home/www/dev/work/website/lvesu/template/blog/cms/php.manual.tpl on line 2

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$status is deprecated in /home/www/dev/work/website/lvesu/template/blog/index.head.php on line 2
PHP - Manual: Dom\Text - 互联网笔记

略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Dom\Text

2025-04-19

The Dom\Text class

(PHP 8 >= 8.4.0)

简介

The Dom\Text class inherits from Dom\CharacterData and represents a text node.

This is the modern, spec-compliant equivalent of DOMText.

类摘要

class Dom\Text extends Dom\CharacterData {
/* 继承的常量 */
/* 属性 */
public readonly string $wholeText;
/* 继承的属性 */
public string $data;
public readonly int $length;
public readonly int $nodeType;
public readonly string $nodeName;
public readonly string $baseURI;
public readonly bool $isConnected;
public readonly ?Dom\Document $ownerDocument;
public readonly ?Dom\Node $parentNode;
public readonly ?Dom\Element $parentElement;
public readonly Dom\NodeList $childNodes;
public readonly ?Dom\Node $firstChild;
public readonly ?Dom\Node $lastChild;
public readonly ?Dom\Node $previousSibling;
public readonly ?Dom\Node $nextSibling;
/* 方法 */
public splitText(int $offset): Dom\Text
/* 继承的方法 */
public Dom\CharacterData::deleteData(int $offset, int $count): void
public Dom\CharacterData::replaceData(int $offset, int $count, string $data): void
/* Not documented yet */
}

属性

wholeText

Holds all the text of logically-adjacent (not separated by Element, Comment or Processing Instruction) Text nodes.

目录

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。

官方地址:https://www.php.net/manual/en/class.dom-text.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3