4
foreach ($scripts as $script) {
$grader = Grader::getInstance();
$grader->setApplicantId($script['applicant_id'])
->setHandler($x)
->doGrading();
}
平地機類(Singleton類)PHP - 錯誤處理
public function setHandler($x)
{
$this->validateHandler($x);
}
public function validateHandler($x)
{
$this->handleError("Invalid Handler");
return $this;
}
public function handleError($message)
{
}
如何我寫的HandleError功能,使得它停止當前的執行意味着這在validateHandler函數返回$從未達到,版畫屏幕出現錯誤信息,for循環卻不停止運行?
非常感謝你.....它的偉大工程 – kayfun