Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

$t->runInteraction( )

This will execute the named Interaction. This technique can be useful for defining common classes and functions in one Interaction, so that many other Interactions can re-use them without unnecessary copy-pasting. Some clients provide a function that returns configuration constants (typically in JSON format) so that similar answerSpaces can be easily customised where necessary. Note that this does set $t->result to the output of the Interaction. Functions declared with PHP are imported into the local interaction that calls this madl command so that it may be used by the Interaction. The optional QUERY_STRING parameter enables you to supply arguments that may be necessary to run the interaction. The string comes in the form "args[0]=value0&args[1]=value1...argsn=valueN". You are responsible for splitting the string into an array for the args as necessary; an array for args (in this example) is not automatically created. You may also specify arbitrary arguments in addition to args... if you wish.

Parameters   

 
$interactionA String. Containing the answerSpace name to execute.
$args
An array of arguments to pass to the interaction. (Optional)
$function runInteraction($interaction, $args=array(), $answer_space_uid=false) 
  • No labels