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

search for in the

tidy::getoptdoc> <tidy::htmlver
Last updated: Fri, 13 Nov 2009

view this page in

tidy::getOpt

tidy_getopt

(PHP 5, PECL tidy >= 0.5.2)

tidy::getOpt -- tidy_getoptTidy ドキュメントについて指定した設定オプションの値を返す

説明

手続き型

mixed tidy_getopt ( tidy $object , string $option )

オブジェクト指向型

mixed tidy::getOpt ( string $option )

Tidy オブジェクト object について指定した設定オプション option の値を返します。

パラメータ

object

Tidy オブジェクト。

option

それぞれの設定オプションと型の一覧は、» http://tidy.sourceforge.net/docs/quickref.html にあります。

返り値

指定した設定オプション option の値を返します。 返される型は、設定オプションの型に依存します。

例1 tidy_getopt() の例

<?php

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

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

</body></html>'
;

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

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


var_dump($tidy->getOpt('accessibility-check')); //integer
var_dump($tidy->getOpt('lower-literals')); //boolean
var_dump($tidy->getOpt('alt-text')); //string

?>

上の例の出力は以下となります。

int(3)
bool(true)
string(9) "some text"



add a note add a note User Contributed Notes
tidy::getOpt
There are no user contributed notes for this page.

tidy::getoptdoc> <tidy::htmlver
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites