CakeFest 2024: The Official CakePHP Conference

tidy クラス

(PHP 5, PHP 7, PHP 8, PECL tidy >= 0.5.2)

はじめに

HTML ファイル中の HTML ノードで、tidy が検出したものです。

クラス概要

class tidy {
/* プロパティ */
public ?string $errorBuffer = null;
public ?string $value = null;
/* メソッド */
public __construct(
    ?string $filename = null,
    array|string|null $config = null,
    ?string $encoding = null,
    bool $useIncludePath = false
)
public body(): ?tidyNode
public cleanRepair(): bool
public diagnose(): bool
public getConfig(): array
public getHtmlVer(): int
public getOpt(string $option): string|int|bool
public getOptDoc(string $option): string|false
public getRelease(): string
public getStatus(): int
public head(): ?tidyNode
public html(): ?tidyNode
public isXhtml(): bool
public isXml(): bool
public parseFile(
    string $filename,
    array|string|null $config = null,
    ?string $encoding = null,
    bool $useIncludePath = false
): bool
public parseString(string $string, array|string|null $config = null, ?string $encoding = null): bool
public static repairFile(
    string $filename,
    array|string|null $config = null,
    ?string $encoding = null,
    bool $useIncludePath = false
): string|false
public static repairString(string $string, array|string|null $config = null, ?string $encoding = null): string|false
public root(): ?tidyNode
}

プロパティ

value

ノードをHTMLで表現したもの。ノードを囲むタグを含みます。

目次

  • tidy::body — Tidy パースツリーの <body> タグから始まる tidyNode オブジェクトを返す
  • tidy::cleanRepair — パースされたマークアップに設定に基く誤りの修正を行う
  • tidy::__construct — 新しい tidy オブジェクトを作成する
  • tidy::diagnose — パース、修正されたマークアップの診断を行う
  • tidy::$errorBuffer — 指定したドキュメントのパースで発生した警告とエラーを返す
  • tidy::getConfig — 現在の Tidy の設定を取得する
  • tidy::getHtmlVer — 指定したドキュメントで検出された HTML バージョンを取得する
  • tidy::getOpt — Tidy ドキュメントについて指定した設定オプションの値を返す
  • tidy::getOptDoc — 与えられたオプション名に対するドキュメントを返す
  • tidy::getRelease — Tidy ライブラリのリリース日 (バージョン) を取得する
  • tidy::getStatus — 指定したドキュメントのステータスを取得する
  • tidy::head — Tidy パースツリーの <head> タグから始まる tidyNode オブジェクトを返す
  • tidy::html — Tidy パースツリーの <html> タグから始まる tidyNode オブジェクトを返す
  • tidy::isXhtml — ドキュメントが XHTML ドキュメントかどうかを示す
  • tidy::isXml — ドキュメントが一般的な XML ドキュメント (非 HTML/XHTML) かどうかを示す
  • tidy::parseFile — ファイルまたは URI にあるマークアップをパースする
  • tidy::parseString — 文字列にストアされたドキュメントをパースする
  • tidy::repairFile — ファイルを修正し、それを文字列として返す
  • tidy::repairString — 別途提供される設定ファイルを使用して文字列を修正する
  • tidy::root — Tidy パースツリーのルートを表す tidyNode を返す
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top