mirror of
https://github.com/friendica/friendica
synced 2025-04-25 20:30:11 +00:00
Add DI to ParsedLogIterator, replace constructors with fluent api
This commit is contained in:
parent
a62124285d
commit
ec4f53d56f
5 changed files with 88 additions and 27 deletions
|
@ -71,7 +71,11 @@ class View extends BaseAdmin
|
|||
$error = DI::l10n()->t('Error trying to open <strong>%1$s</strong> log file.\r\n<br/>Check to see if file %1$s exist and is readable.', $f);
|
||||
} else {
|
||||
try {
|
||||
$data = new ParsedLogIterator($f, self::LIMIT, $filters, $search);
|
||||
$data = DI::parsedLogIterator()
|
||||
->open($f)
|
||||
->withLimit(self::LIMIT)
|
||||
->withFilters($filters)
|
||||
->withSearch($search);
|
||||
} catch (Exception $e) {
|
||||
$error = DI::l10n()->t('Couldn\'t open <strong>%1$s</strong> log file.\r\n<br/>Check to see if file %1$s is readable.', $f);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue