public function __construct($name, array $config = [])
{
if (empty($name)) {
throw new WorkflowException('Failed to create event instance : missing $name value');
} else {
$this->name = $name;
}
if (isset($config['start'])) {
$this->_start = $config['start'];
unset($config['start']);
}
if (isset($config['end'])) {
$this->_end = $config['end'];
unset($config['end']);
}
if (isset($config['transition'])) {
$this->_transition = $config['transition'];
unset($config['transition']);
}
unset($config['name']);
parent::__construct($config);
}