class error{ function error_sms($sms){ if($sms){ include "template.php"; $template = new Template(); $template->addErrText($sms); } } }