public function setInvokeType($type)
{
$type = strtolower($type);
$allowedRegistrations = array(Registration::SINGLE_REGISTRATION, Registration::ROUNDROBIN_REGISTRATION, Registration::RANDOM_REGISTRATION, Registration::THRUWAY_REGISTRATION, Registration::FIRST_REGISTRATION, Registration::LAST_REGISTRATION);
if (in_array($type, $allowedRegistrations)) {
if ($type !== Registration::SINGLE_REGISTRATION) {
$this->invokeType = $type;
$this->setAllowMultipleRegistrations(true);
} else {
$this->invokeType = Registration::SINGLE_REGISTRATION;
$this->setAllowMultipleRegistrations(false);
}
}
}