/**
* Instanciate an object of the relevant class, depending on the request type
* @return DBObject
*/
true
public
Factory
Get('request_type');
if ($sType == 'incident')
{
if (!class_exists('Incident'))
{
throw new Exception('Could not create a ticket after the service '.$oServiceSubcategory->Get('friendlyname').' of type '.$sType.': unknown class "Incident"');
}
$oRet = new Incident();
}
else
{
if (!class_exists('UserRequest'))
{
throw new Exception('Could not create a ticket after the service '.$oServiceSubcategory->Get('friendlyname').' of type '.$sType.': unknown class "UserRequest"');
}
$oRet = new UserRequest();
}
return $oRet;
}]]>