'_doDownload',
);
/**
* @var App_Event_Certificate_Obj
*/
var $DBObj;
public function __construct()
{
$this->DBObj = new App_Event_Certificate_Obj(Qs_Request::getGetValue('id'));
}
function exec($Doc)
{
$this->Doc = $Doc;
parent::exec();
}
protected function _doDownload()
{
if (false !== ($fileName = $this->_getFileName())) {
Qs_File::out(FILE_DB_FS_PATH . '/' . $fileName);
}
}
protected function _getFileName()
{
if (false === ($fileName = $this->DBObj->getFileName())) {
$errors = $this->DBObj->getErrors();
sendDeveloperEmail('Error generate certificate: ' . implode('
', $errors));
$this->Doc->displayError('Internal Error. ' . implode('
', $errors));
return false;
}
return $fileName;
}
}