Skip to content

Add simpler interface #1

@danmichaelo

Description

@danmichaelo

First, thanks for creating this library! I just wonder if you would consider a simpler interface? I feel like four lines of code is a bit much to achieve something this simple:

$config = new \IcyApril\Tail\Config($fileLocation);
$config->setLines(2);

$tail = new \IcyApril\Tail\Tail($config);
echo $tail->getTail();

While keeping the existing interface, what do you think about adding a simpler shortcut? Perhaps something like:

echo Tail::tail($fileLocation, 2);

? I could submit a PR, but would like to know what you think first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions