Esempio n. 1
0
 /**
  * @param $storeDir
  */
 public function __construct($storeDir)
 {
     $finder = new Finder();
     $storeFiles = $finder->files()->name('*' . StoreFile::FILE_EXTENSION)->depth(0)->in($storeDir);
     $store = new Store();
     foreach ($storeFiles as $file) {
         /** @var \SplFileObject $file */
         $store->add(basename($file->getRealpath(), StoreFile::FILE_EXTENSION), file($file->getRealpath(), FILE_IGNORE_NEW_LINES));
     }
     $this->store = $store;
     $this->dispatcher = new StoreEventDispatcher($storeDir);
 }
 /**
  * @param Event $event
  */
 public function send(Event $event)
 {
     /** @var LoggerEvent $event */
     $this->storeFile->log($event->getRaw());
 }