Example #1
0
 protected function doRun()
 {
     $this->data = ['files' => [], 'data' => []];
     $this->logger = $this->container->get('logger');
     $this->io = $this->container->get('io');
     $this->loop = $this->container->get('eventloop');
     $this->factory = $this->container->get('factory');
     $this->project = $this->container->get('project');
     $this->cachePath = $this->io->getCacheDir('indexer') . '/' . sha1($this->project->getRootPath()) . '.json';
     $this->updateQueue = new \SplQueue();
     $this->loadCache();
     $fsEvents = ['modify', 'delete', 'move_to', 'move_from'];
     $this->monitor = new INotifyProcessMonitor($this->project->getRootPath(), $fsEvents);
     $this->setupFsEvents();
     $this->watch();
 }