CakeFest 2024: The Official CakePHP Conference

tidy::getStatus

tidy_get_status

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

tidy::getStatus -- tidy_get_statusObtiene el status de un documento especificado

Descripción

Estilo orientado a objetos

public tidy::getStatus(): int

Estilo por procedimientos

tidy_get_status(tidy $tidy): int

Devuelve el status del objeto tidy tidy especificado.

Parámetros

tidy

El objeto Tidy.

Valores devueltos

Devuelve 0 si no hay errores/alertas, 1 para alertas de accesibilidad, o 2 para los errores.

Ejemplos

Ejemplo #1 Ejemplo de tidy::getStatus()

<?php
$html
= '<p>paragraph</i>';
$tidy = new tidy();
$tidy->parseString($html);

$tidy2 = new tidy();
$html2 = '<bogus>test</bogus>';
$tidy2->parseString($html2);

echo
$tidy->getStatus(); //1

echo $tidy2->getStatus(); //2
?>

add a note

User Contributed Notes

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