1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-21 22:47:43 +00:00
Files
matomo/plugins/MobileMessaging/ReportRenderer/ReportRendererException.php
Michal Kleiner 9a3ef94df6 [Coding Style] Enable rule PSR12.Files.FileHeader + unify file headers (#22132)
* [Coding Style] Enable rule PSR12.Files.FileHeader

* Apply CS

* Replace Piwik with Matomo in file headers

* Unify file headers (position, no. of lines, https links)

* Rebuild dist files

* Apply CS

* Fix system test that relies on line numbers in a file that had the file header updated

---------

Co-authored-by: Stefan Giehl <stefan@matomo.org>
2024-04-20 20:50:47 +02:00

86 خطوط
1.7 KiB
PHP

<?php
/**
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Plugins\MobileMessaging\ReportRenderer;
use Piwik\ReportRenderer;
/**
*
*/
class ReportRendererException extends ReportRenderer
{
private $rendering = "";
public function __construct($exception)
{
$this->rendering = $exception;
}
public function setLocale($locale)
{
// nothing to do
}
public function sendToDisk($filename)
{
return ReportRenderer::writeFile(
$filename,
Sms::SMS_FILE_EXTENSION,
$this->rendering
);
}
public function sendToBrowserDownload($filename)
{
ReportRenderer::sendToBrowser(
$filename,
Sms::SMS_FILE_EXTENSION,
Sms::SMS_CONTENT_TYPE,
$this->rendering
);
}
public function sendToBrowserInline($filename)
{
ReportRenderer::inlineToBrowser(
Sms::SMS_CONTENT_TYPE,
$this->rendering
);
}
public function getRenderedReport()
{
return $this->rendering;
}
public function renderFrontPage($reportTitle, $prettyDate, $description, $reportMetadata, $segment)
{
// nothing to do
}
public function renderReport($processedReport)
{
// nothing to do
}
/**
* Get report attachments, ex. graph images
*
* @param $report
* @param $processedReports
* @param $prettyDate
* @return array
*/
public function getAttachments($report, $processedReports, $prettyDate)
{
return array();
}
}