downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

tidy::getoptdoc> <tidy::getHtmlVer
[edit] Last updated: Fri, 17 May 2013

view this page in

Tidy::getopt

tidy_getopt

(PHP 5, PECL tidy >= 0.5.2)

Tidy::getopt -- tidy_getoptRetourne la valeur de l'option de configuration Tidy

Description

Style orienté objet

mixed tidy::getOpt ( string $option )

Style procédural

mixed tidy_getopt ( tidy $object , string $option )

tidy_getopt() retourne la valeur de l'option spécifiée option pour l'objet object. Le type retourné dépend du type de l'option spécifiée option.

Liste de paramètres

object

L'objet Tidy

option

Pour une explication sur chaque option, voyez » http://tidy.sourceforge.net/docs/quickref.html.

Valeurs de retour

Retourne la valeur spécifiée par l'option option. Le type de la valeur dépend de l'option elle-même.

Exemples

Exemple #1 Exemple avec Tidy::getopt()

<?php

$html 
='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html><head><title>Titre</title></head>
 <body>

  <p><img src="img.png"></p>

  </body></html>'
;

 
$config = array('accessibility-check' => 3,
 
'alt-text' => 'du texte');

 
$tidy = new tidy();
 
$tidy->parseString($html$config);


 
var_dump($tidy->getOpt('accessibility-check')); //entier
 
var_dump($tidy->getOpt('lower-literals'));      //booléen
 
var_dump($tidy->getOpt('alt-text'));            //chaîne

 
?>

L'exemple ci-dessus va afficher :

int(3)
bool(true)
string(8) "du texte"



add a note add a note User Contributed Notes Tidy::getopt - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites