mirror of
https://github.com/php/doc-ja.git
synced 2026-03-24 07:02:08 +01:00
106 lines
2.8 KiB
XML
106 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: bad9acb50797346b072f9ff6addf05ee6c385570 Maintainer: takagi Status: ready -->
|
|
<refentry xml:id="xsltprocessor.setprofiling" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>XSLTProcessor::setProfiling</refname>
|
|
<refpurpose>プロファイル情報の出力ファイルを設定する</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis role="XSLTProcessor">
|
|
<modifier>public</modifier> <type>true</type><methodname>XSLTProcessor::setProfiling</methodname>
|
|
<methodparam><type class="union"><type>string</type><type>null</type></type><parameter>filename</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
スタイルシート処理時のプロファイル情報を出力するファイルを設定します。
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>filename</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
プロファイル情報を出力するファイルへのパス。
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.true.always;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>プロファイル出力の例</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// XML ソースを読み込みます
|
|
$xml = new DOMDocument;
|
|
$xml->load('collection.xml');
|
|
|
|
$xsl = new DOMDocument;
|
|
$xsl->load('collection.xsl');
|
|
|
|
// 変換器を設定します
|
|
$proc = new XSLTProcessor;
|
|
$proc->setProfiling('profiling.txt');
|
|
$proc->importStyleSheet($xsl); // xsl ルールをアタッチします
|
|
|
|
echo trim($proc->transformToDoc($xml)->firstChild->wholeText);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
上のコードは、ファイルの処理時に次のような情報を出力します。
|
|
</para>
|
|
<screen>
|
|
<![CDATA[
|
|
number match name mode Calls Tot 100us Avg
|
|
|
|
0 cd 2 3 1
|
|
1 collection 1 1 1
|
|
|
|
Total 3 4
|
|
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|