mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-20 02:48:56 +00:00
111 lines
2.6 KiB
XML
111 lines
2.6 KiB
XML
![]() |
<?xml version="1.0" encoding="iso-8859-1"?>
|
||
|
<!-- $Revision: 1.1 $ -->
|
||
|
<refentry xml:id="xsltprocessor.setprofiling" xmlns="http://docbook.org/ns/docbook">
|
||
|
<refnamediv>
|
||
|
<refname>XSLTProcessor::setProfiling</refname>
|
||
|
<refpurpose>Sets profiling output file</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1 role="description">
|
||
|
&reftitle.description;
|
||
|
<classsynopsis>
|
||
|
<ooclass><classname>XSLTProcessor</classname></ooclass>
|
||
|
<methodsynopsis>
|
||
|
<type>bool</type><methodname>setProfiling</methodname>
|
||
|
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||
|
</methodsynopsis>
|
||
|
</classsynopsis>
|
||
|
<para>
|
||
|
Sets the file to output profiling information when processing
|
||
|
a stylesheet.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
|
||
|
<refsect1 role="parameters">
|
||
|
&reftitle.parameters;
|
||
|
<para>
|
||
|
<variablelist>
|
||
|
<varlistentry>
|
||
|
<term><parameter>filename</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Path to the file to dump profiling information.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
</variablelist>
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
|
||
|
<refsect1 role="returnvalues">
|
||
|
&reftitle.returnvalues;
|
||
|
<para>
|
||
|
&return.success;
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
|
||
|
<refsect1 role="examples">
|
||
|
&reftitle.examples;
|
||
|
<para>
|
||
|
<example>
|
||
|
<title>Example profiling output</title>
|
||
|
<programlisting role="php">
|
||
|
<![CDATA[
|
||
|
<?php
|
||
|
// Load the XML source
|
||
|
$xml = new DOMDocument;
|
||
|
$xml->load('collection.xml');
|
||
|
|
||
|
$xsl = new DOMDocument;
|
||
|
$xsl->load('collection.xsl');
|
||
|
|
||
|
// Configure the transformer
|
||
|
$proc = new XSLTProcessor;
|
||
|
$proc->setProfiling('profiling.txt');
|
||
|
$proc->importStyleSheet($xsl); // attach the xsl rules
|
||
|
|
||
|
echo trim($proc->transformToDoc($xml)->firstChild->wholeText);
|
||
|
?>
|
||
|
]]>
|
||
|
</programlisting>
|
||
|
<para>
|
||
|
The above code will produce the following information
|
||
|
in the profiling file:
|
||
|
</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:"../../../../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
|
||
|
-->
|