Utilisation de l’outil debug via la méthode “log”

Edit me

La méthode “log” est disponible dans la classe “Core_Library_Event_Context” en PHP, dont une instance est systématiquement passée dans les hooks permettant d’intervenir dans le cycle de vie d’une frame (voir l’article Frame et hooks).

Exemple d’utilisation :

protected function _getPatient_get_afterExecute( Core_Library_Event_Context $oContext )
{
    $oContext->log();
}

Résultat :

2018-11-29 16:53:50 INFO (6): 16.5 MiB - _getPatient_get_afterExecute -> Context log on line 160 in C:\wamp\www\apps\cardiomassy\modules\form\controllers\FrameController.php : Array
(
    [iFormId] => 0
    [sFormFileName] => 
    [sFormFilePath] => 
    [oOnStandByFrame] => 
    [sXMLFormId] => zdlbfgblvg1499158900254
    [oForm] => Core_Library_Resource_XML_Frame_Form
    [aParams] => Array
        (
            [module] => form
            [controller] => frame
            [action] => getPatient
            [sid] => zdlbfgblvg1499158900254
            [id_data] => 4
            [mfid] => yui_3_10_1_1_1543498073094_32
        )

    [oDataStructure] => Core_Library_Resource_XML_DataStructure
    [aDatasets] => Array
        (
            [0] => Core_Library_Resource_XML_DataSet id = "filter"; total rows = 0
            [1] => Core_Library_Resource_XML_DataSet id = "test"; total rows = 0
            [2] => Core_Library_Resource_XML_DataSet id = "patient"; total rows = 1
            [3] => Core_Library_Resource_XML_DataSet id = "search_generaliste2"; total rows = 0
            [4] => Core_Library_Resource_XML_DataSet id = "search_generaliste3"; total rows = 0
            [5] => Core_Library_Resource_XML_DataSet id = "search_generaliste1"; total rows = 0
            [6] => Core_Library_Resource_XML_DataSet id = "search_cardio2"; total rows = 0
            [7] => Core_Library_Resource_XML_DataSet id = "search_cardio3"; total rows = 0
            [8] => Core_Library_Resource_XML_DataSet id = "search_cardio1"; total rows = 0
            [9] => Core_Library_Resource_XML_DataSet id = "event"; total rows = 3
            [10] => Core_Library_Resource_XML_DataSet id = "param_nav"; total rows = 4
        )

)