Files
ik-codex/src/Log/File/LogFileInterface.php
indifferentketchup 8ae7da5259 Expose source path on LogFileInterface
Add LogFileInterface::getPath(): ?string so detectors can dispatch on a
filename hint when the original path is known. Default implementation on
the abstract LogFile base returns null; PathLogFile records its
constructor argument. StringLogFile and StreamLogFile inherit the null
default. Tests cover both the path and null-fallback cases.
2026-04-30 20:29:21 +00:00

29 lines
649 B
PHP

<?php
namespace IndifferentKetchup\Codex\Log\File;
/**
* Interface LogFileInterface
*
* @package IndifferentKetchup\Codex\Log\File
*/
interface LogFileInterface
{
/**
* Get the log file content
*
* @return string
*/
public function getContent(): string;
/**
* Get the source path of the log file when one is known
*
* Returns null for log files without a filesystem origin (string content,
* arbitrary streams). Concrete implementations should return the path used
* to construct them when applicable.
*
* @return string|null
*/
public function getPath(): ?string;
}