function __construct() { parent::__construct(self::ERROR_CODE, self::ERROR_MESSAGE); }
private static function saveFile($path) { $tmpFileName = tempnam(\Yii::app()->runtimePath, "pdf"); $content = self::getParser()->getContent($path); if (self::getParser()->HTTP_CODE !== 200) { $document = \phpQuery::newDocumentHTML($content); $error = strip_tags($document->find('#error h1')->html()); CompanyException::downloadError($error); } file_put_contents($tmpFileName, $content); return $tmpFileName; }