- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
Class FactoryAchievesController {
public static function factory($type)
{
try {
if ($type) {
$classname = ucfirst(strtolower($type)).'AchievesController';
if (require_once 'class.achieves.'.$type . '.php') {
return new $classname;
} else {
throw new Exception('Class '.$classname.' not found');
}
} else {
throw new Exception('Achieves type not defined');
}
} catch (Exception $exc) {
// LOG
//echo $exc->getTraceAsString();
}
}
}
Комментарии (0) RSS
Добавить комментарий