public function getParams()
{
// our return value
$return = array();
// populate it with the parameters from the templates
foreach ($this->storyTemplates as $template) {
// get any params from the template
$params = $template->getParams();
// any params already set have precedence
foreach ($params as $key => $value) {
// do we have a clash?
if (!isset($return[$key])) {
$return[$key] = $value;
}
}
}
// now, merge in our own params
//
// our params always take precedence over the params set
// in the template(s)
$return = array_merge($this->params, $return);
// all done
return $return;
}