all
Some checks failed
Publish Docker Image / build-and-push (push) Failing after 2m13s

This commit is contained in:
Sam Kintop
2026-04-30 09:44:02 -05:00
parent 0a30837e3d
commit bf3870ccca
111 changed files with 8383 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
namespace Aternos\Mclogs\Filter;
use Aternos\Mclogs\Config\Config;
use Aternos\Mclogs\Config\ConfigKey;
class LimitBytesFilter extends Filter
{
/**
* Filter the $data string and return it
*
* Cuts the length down to maxLength
*
* @param string $data
* @return string
*/
public function filter(string $data): string
{
$lengthLimit = Config::getInstance()->get(ConfigKey::STORAGE_LIMIT_BYTES);
return mb_strcut($data, 0, $lengthLimit);
}
/**
* @return FilterType
*/
public function getType(): FilterType
{
return FilterType::LIMIT_BYTES;
}
/**
* @return array
*/
public function getData(): array
{
return [
"limit" => Config::getInstance()->get(ConfigKey::STORAGE_LIMIT_BYTES)
];
}
}