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

search for in the

XSLTProcessor::transformToDoc> <XSLTProcessor::setParameter
Last updated: Fri, 14 Aug 2009

view this page in

XSLTProcessor::setProfiling

(PHP >= 5.3.0)

XSLTProcessor::setProfilingSpécifie le fichier de profilage

Description

bool setProfiling ( string $filename )

Spécifie le fichier de sortie contenant les informations de profilage lors de l'exécution d'une feuille de style.

Liste de paramètres

filename

Chemin vers le fichier pour décharger les informations de profilage.

Valeurs de retour

Cette fonction retourne TRUE en cas de succès, FALSE en cas d'échec.

Exemples

Exemple #1 Exemple d'utilisation du profilage

<?php
// Chargement de la source XML
$xml = new DOMDocument;
$xml->load('collection.xml');

$xsl = new DOMDocument;
$xsl->load('collection.xsl');

// Configuration du transformateur
$proc = new XSLTProcessor;
$proc->setProfiling('profiling.txt');
$proc->importStyleSheet($xsl); // attachement des règles xsl

echo trim($proc->transformToDoc($xml)->firstChild->wholeText);
?>

Le code ci-dessus produira les informations suivantes dans le fichier de profilage :

number               match                name      mode  Calls Tot 100us Avg

    0                   cd                                    2      3      1
    1           collection                                    1      1      1

                         Total                                3      4



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

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