public function __construct($config = [])
{
if (!empty($config['start'])) {
$this->_startStatus = $config['start'];
unset($config['start']);
if (!$this->_startStatus instanceof StatusInterface) {
throw new WorkflowException('Start status object must implement raoul2000\\workflow\\base\\StatusInterface');
}
} else {
throw new InvalidConfigException('missing start status');
}
if (!empty($config['end'])) {
$this->_endStatus = $config['end'];
unset($config['end']);
if (!$this->_endStatus instanceof StatusInterface) {
throw new WorkflowException('End status object must implement raoul2000\\workflow\\base\\StatusInterface');
}
} else {
throw new InvalidConfigException('missing end status');
}
parent::__construct($config);
$this->_id = $this->_startStatus->getId() . '-' . $this->_endStatus->getId();
}