If you want to use a non-static method as a callback for XML_Query2XML you have to use an instance of a class that implements this interface. Your command class (read more about the command pattern here) therefore has to implement a public method that is named "execute" and accepts an array as its first argument. Here goes an example:
require_once 'XML/Query2XML/Callback.php';
class MyCallback implements XML_Query2XML_Callback
{
public function execute(array $record)
{
$data = $record['some_column'];
// do some really complex things with $data
return $data;
}
}
$myCallback = new MyCallback();
XML_Query2XML will always invoke the execute() method and will pass the current record as an associative array as the first and only argument. A command object can be used for