本文整理汇总了PHP中Doku_Event::trigger方法的典型用法代码示例。如果您正苦于以下问题:PHP Doku_Event::trigger方法的具体用法?PHP Doku_Event::trigger怎么用?PHP Doku_Event::trigger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doku_Event
的用法示例。
在下文中一共展示了Doku_Event::trigger方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trigger_event
/**
* trigger_event
*
* function wrapper to process (create, trigger and destroy) an event
*
* @PARAM $name (string) name for the event
* @PARAM $data (mixed) event data
* @PARAM $action (callback) (optional, default=NULL) default action, a php callback function
* @PARAM $canPreventDefault (bool) (optional, default=true) can hooks prevent the default action
*
* @RETURN (mixed) the event results value after all event processing is complete
* by default this is the return value of the default action however
* it can be set or modified by event handler hooks
*/
function trigger_event($name, &$data, $action = NULL, $canPreventDefault = true)
{
$evt = new Doku_Event($name, $data);
return $evt->trigger($action, $canPreventDefault);
}