In addition to passing one or more strings with your audit messages you may want to including some other arbitrary data.
To do so, call the addMemo()
method. The first argument is
the name of the memo value while the second argument is the value. It is recommended you
pass only simple values such as strings or ints as other values may produce inconsistent
results.
You can add multiple memos with the same name to a single audit entry.
Example 4.3. Including memo data with an audit message
<?php $message = new Application_Auditor_Message('Item created', 'mymodule'); $message->addMemo('title', 'XYZ Product') ->addMemo('country', 'Australia') ->record(); ?>