Code: Select all
public function setError($msg)
{
$this->errors[] = $msg;
$this->lastError = $msg;
}
/**
* Get the last error that occured
* @return string
*/
public function getLastError()
{
if (count($this->errors)) return $this->errors[count($this->errors)-1];
}