previous->getDatabaseResult() (Previous) (Next) ->debug()next

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

DB_DataObject::debugLevel

DB_DataObject::debugLevel – Définit l'affichage du débogage

Synopsis

void DB_DataObject::debugLevel ( integer $level )

Description

Définit et retourne le niveau de débogage. Donc, vous pouvez voir les requêtes et les connexions construites et exécutées.

Parameter

  • integer $level - niveau, sans aucun paramètre. Il désactivera l'affichage du débogage. 1 fournit un affichage général, 5 inclut des choses comme les mots de passe des connexions.

Note

This function can not be called statically.

Example

Exemple avec debugLevel()

<?php
// Activation du débogage haut niveau
DB_DataObject::debugLevel(5);
$person = new DataObjects_Person;
$person->get(12);
$person->setFrom($_POST['input']);
$person->update();
// Désactivation du débogage
DB_DataObject::debugLevel();
?>
previous->getDatabaseResult() (Previous) (Next) ->debug()next

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
Note by: delatbabel@spamgourmet.com
Undocumented feature: You can set debugLevel to a callable function, e.g.

'myDebugFunction'

or

array('myDebugClass', 'myDebugMethod')

Then the function will be called by DB_DataObject's debug method. See the note on debug().

Del