2017 © Pedro PelĂĄez
 

library directory-runner

Run through a directory with event-emitting along the way

image

kompakt/directory-runner

Run through a directory with event-emitting along the way

  • Monday, June 11, 2018
  • by kompakt
  • Repository
  • 2 Watchers
  • 0 Stars
  • 29 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 26 % Grown

The README.md

Kompakt\DirectoryRunner

Run through a directory with event-emitting along the way., (*1)

Install

Through Composer:, (*2)

  • composer require kompakt/directory-runner

Example

Iterate over all json files in a given directory:, (*3)

use Kompakt\DirectoryRunner\Subscriber\Debugger;
use Kompakt\DirectoryRunner\Runner;
use Kompakt\DirectoryRunner\EventNames;
use Symfony\Component\EventDispatcher\EventDispatcher;

$dir = 'path/to/dir';

$dispatcher = new EventDispatcher();
$eventNames = new EventNames();
$runner = new Runner($dispatcher, $eventNames, $dir);
$debugger = new Debugger($dispatcher, $eventNames);
$debugger->activate();

$callback = function($fileInfo)
{
    return preg_match('/\.json$/', $fileInfo->getFilename());
};

$runner->run($callback);

License

kompakt/directory-runner is licensed under the MIT license - see the LICENSE file for details, (*4)

The Versions

11/06 2018

dev-master

9999999-dev

Run through a directory with event-emitting along the way

  Sources   Download

The Requires

 

The Development Requires

by Christian Hoegl
by Christian Högl

11/06 2018

1.1.1

1.1.1.0

Run through a directory with event-emitting along the way

  Sources   Download

The Requires

 

The Development Requires

by Christian Högl

11/06 2018

1.1.0

1.1.0.0

Run through a directory with event-emitting along the way

  Sources   Download

The Requires

 

The Development Requires

by Christian Högl