* @license PHP License * @package WB * @subpackage base */ WBClass::load('WBEvent_Handler'); /** * Event Handler Config to Event Data * * Set event data by config * * @version 1.0.0 * @package WB * @subpackage base */ class WBEvent_Handler_Config2Event extends WBEvent_Handler { /** * Handler config * * Parameters: * - any * * @var array */ protected $config = array(); /** * Set Event Data From Config * * @see isRecoverable() * @param WBEvent $e * @return bool true to continue, false to stop processing */ public function process(WBEvent $e) { foreach ($this->config as $k => $v) { $e->set($k, $v); } return true; } }